forked from mirrors/bookwyrm
Adds rank field to edition model
This commit is contained in:
parent
7e2460955d
commit
b44b42be7e
2 changed files with 20 additions and 0 deletions
19
bookwyrm/migrations/0035_edition_edition_rank.py
Normal file
19
bookwyrm/migrations/0035_edition_edition_rank.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.0.7 on 2021-01-11 17:18
|
||||
|
||||
import bookwyrm.models.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('bookwyrm', '0034_importjob_complete'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='edition',
|
||||
name='edition_rank',
|
||||
field=bookwyrm.models.fields.IntegerField(default=0),
|
||||
),
|
||||
]
|
|
@ -164,6 +164,7 @@ class Edition(Book):
|
|||
parent_work = fields.ForeignKey(
|
||||
'Work', on_delete=models.PROTECT, null=True,
|
||||
related_name='editions', activitypub_field='work')
|
||||
edition_rank = fields.IntegerField(default=0)
|
||||
|
||||
activity_serializer = activitypub.Edition
|
||||
name_field = 'title'
|
||||
|
|
Loading…
Reference in a new issue