Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/book/migrations/0007_auto_20230203_1215.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.16 on 2023-02-03 06:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('book', '0006_auto_20230119_1225'),
]

operations = [
migrations.AlterField(
model_name='book',
name='grade',
field=models.CharField(blank=True, choices=[('ecd', 'ECD'), ('grade_1', 'Grade 1'), ('grade_2', 'Grade 2'), ('grade_3', 'Grade 3')], max_length=40, null=True, verbose_name='Grade'),
),
migrations.AlterField(
model_name='book',
name='language',
field=models.CharField(choices=[('english', 'English'), ('nepali', 'Nepali'), ('Maithali', 'Maithali'), ('Tharu', 'Tharu'), ('bilingual', 'Bilingual')], max_length=40, verbose_name='Language'),
),
]
6 changes: 3 additions & 3 deletions apps/book/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ class LanguageType(models.TextChoices):
NEPALI = 'nepali', _('Nepali')
MAITHALI = 'Maithali', _('Maithali')
THARU = 'Tharu', _('Tharu')
BILINGUAL = 'bilingual', _('BILINGUAL')
BILINGUAL = 'bilingual', _('Bilingual')

class Grade(models.TextChoices):
ECD = 'ecd', _('ECD')
GRADE_1 = 'grade_1', _('Grade 1')
GRADE_2 = 'grade_2', _('Grade 2')
GRADE_3 = 'grade_3', _('Grade 3')
GRADE_4 = 'grade_4', _('Grade 4')
GRADE_5 = 'grade_5', _('Grade 5')
# GRADE_4 = 'grade_4', _('Grade 4')
# GRADE_5 = 'grade_5', _('Grade 5')
Comment on lines +72 to +73

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm is this willn't break according to existing data?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to @kopitek8 there are no books of grade 4, 5 now in production server, and for this season we don't upload books for grade 4,5

@kopitek8 Can you confirm here too?

@thenav56 thenav56 Feb 3, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bimal125 Can you also do a quick query and confirm this as well?
In both staging & prod

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No books for grade 4 & 5. Confirmed


# Basic Fields
title = models.CharField(max_length=255, verbose_name=_('Title'))
Expand Down
23 changes: 23 additions & 0 deletions apps/order/migrations/0011_auto_20230203_1215.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.16 on 2023-02-03 06:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('order', '0010_auto_20230119_1225'),
]

operations = [
migrations.AlterField(
model_name='bookorder',
name='grade',
field=models.CharField(blank=True, choices=[('ecd', 'ECD'), ('grade_1', 'Grade 1'), ('grade_2', 'Grade 2'), ('grade_3', 'Grade 3')], max_length=40, null=True, verbose_name='Grade'),
),
migrations.AlterField(
model_name='bookorder',
name='language',
field=models.CharField(blank=True, choices=[('english', 'English'), ('nepali', 'Nepali'), ('Maithali', 'Maithali'), ('Tharu', 'Tharu'), ('bilingual', 'Bilingual')], max_length=40, null=True, verbose_name='Language'),
),
]
2 changes: 0 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ enum BookGradeEnum {
GRADE_1
GRADE_2
GRADE_3
GRADE_4
GRADE_5
}

enum BookLanguageEnum {
Expand Down