Skip to content

Commit 335001c

Browse files
committed
DBC22-3320: fixed build_data_diff failing on all linestrings
1 parent b4215b6 commit 335001c

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 4.2.16 on 2025-01-24 00:05
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('authentication', '0012_savedroutes_notification_days_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='savedroutes',
15+
name='notification',
16+
field=models.BooleanField(blank=True, default=False),
17+
),
18+
migrations.AlterField(
19+
model_name='savedroutes',
20+
name='notification_days',
21+
field=models.JSONField(blank=True, default=list),
22+
),
23+
migrations.AlterField(
24+
model_name='savedroutes',
25+
name='notification_types',
26+
field=models.JSONField(blank=True, default=list),
27+
),
28+
]

src/backend/apps/authentication/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class SavedRoutes(BaseModel):
7474
criteria = models.CharField(choices=ROUTE_CRITERIA_CHOICES, max_length=100, default=ROUTE_CRITERIA.FASTEST)
7575
searchTimestamp = models.CharField(max_length=100, default='fastest')
7676

77-
notification = models.BooleanField(default=False)
78-
notification_types = models.JSONField(default=list) # list of event display types to notify
79-
notification_days = models.JSONField(default=list) # List of days of the week
77+
notification = models.BooleanField(default=False, blank=True) # Whether to notify user of events on route
78+
notification_types = models.JSONField(default=list, blank=True) # list of event display types to notify
79+
notification_days = models.JSONField(default=list, blank=True) # List of days of the week
8080
notification_start_date = models.DateField(null=True, blank=True) # Date to start notifications
8181
notification_end_date = models.DateField(null=True, blank=True) # Date to end notifications
8282
notification_start_time = models.TimeField(null=True, blank=True) # Time of day for notifications

src/backend/apps/event/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def build_data_diff(current_obj, new_obj_data):
5858
data_diff['polygon'] = None
5959

6060
else:
61-
ls = LineString(new_field_data['coordinates'])
61+
ls = LineString(new_field_data['coordinates'], srid=4326)
6262
data_diff[field] = ls
6363

6464
# Add buffer to road condition linestrings

0 commit comments

Comments
 (0)