Skip to content

Commit f3305f3

Browse files
fix: update QR verification logic to continue on meal timing errors (#137)
* fix: update QR verification logic to continue on meal timing errors * change mess name len in allocation details
1 parent 1688338 commit f3305f3

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

api/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _get_meal_type(self, time):
111111
if meal_timing.start_time <= time <= meal_timing.end_time:
112112
return meal_type
113113
except MessTiming.DoesNotExist:
114-
return None
114+
continue
115115
return None
116116

117117
def _filter_valid_cards(self, cards, meal_type):
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 5.0.13 on 2026-01-30 08:33
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('home', '0009_student_photo'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='allocation',
15+
name='first_pref',
16+
field=models.CharField(blank=True, default=None, help_text='This contians the first preference caterer of the student', max_length=12, null=True, verbose_name='First Preference'),
17+
),
18+
migrations.AlterField(
19+
model_name='allocation',
20+
name='second_pref',
21+
field=models.CharField(blank=True, default=None, help_text='This contians the first preference caterer of the student', max_length=12, null=True, verbose_name='Second Preference'),
22+
),
23+
migrations.AlterField(
24+
model_name='allocation',
25+
name='third_pref',
26+
field=models.CharField(blank=True, default=None, help_text='This contians the first preference caterer of the student', max_length=12, null=True, verbose_name='Third Preference'),
27+
),
28+
]

home/models/allocation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,23 @@ class Allocation(models.Model):
100100
first_pref = models.CharField(
101101
_("First Preference"),
102102
default=None,
103-
max_length=10,
103+
max_length=12,
104104
help_text="This contians the first preference caterer of the student",
105105
null=True,
106106
blank=True,
107107
)
108108
second_pref = models.CharField(
109109
_("Second Preference"),
110110
default=None,
111-
max_length=10,
111+
max_length=12,
112112
help_text="This contians the first preference caterer of the student",
113113
null=True,
114114
blank=True,
115115
)
116116
third_pref = models.CharField(
117117
_("Third Preference"),
118118
default=None,
119-
max_length=10,
119+
max_length=12,
120120
help_text="This contians the first preference caterer of the student",
121121
null=True,
122122
blank=True,

0 commit comments

Comments
 (0)