Refactor deleteCollection function to use DELETE method for API call; update endpoint to match new API structure.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.2.1 on 2025-05-27 16:38
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
def set_end_date_equal_to_start(apps, schema_editor):
|
||||
Visit = apps.get_model('adventures', 'Visit')
|
||||
for visit in Visit.objects.filter(end_date__isnull=True):
|
||||
visit.end_date = visit.start_date
|
||||
visit.save()
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('adventures', '0029_adventure_city_adventure_country_adventure_region'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(set_end_date_equal_to_start),
|
||||
]
|
||||
Reference in New Issue
Block a user