1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-18 20:39:36 +02:00

Refactor deleteCollection function to use DELETE method for API call; update endpoint to match new API structure.

This commit is contained in:
Sean Morley 2025-05-27 12:39:38 -04:00
parent 57aa2c9916
commit 56b8b55b84
3 changed files with 21 additions and 292 deletions

View file

@ -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),
]