From aecbfe4d516a6675d9a213710d0dc616fa3f2042 Mon Sep 17 00:00:00 2001 From: Hhio618 Date: Sun, 25 Oct 2020 11:10:46 +0330 Subject: [PATCH 1/2] remove auto_add=now from last-modified field --- app/marketing/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/marketing/models.py b/app/marketing/models.py index b9e7a528004..4edce67e42c 100644 --- a/app/marketing/models.py +++ b/app/marketing/models.py @@ -420,7 +420,7 @@ class UpcomingDate(SuperModel): """Define the upcoming date model""" # These fields are meant to use for update UpcomingDate based on the icalendar updates uid = models.CharField(max_length=255, null=True, blank=True) - last_modified = models.DateTimeField(db_index=True, auto_now=True) + last_modified = models.DateTimeField(db_index=True) sequence = models.SmallIntegerField(default=0) title = models.CharField(max_length=255) From feccf50dcba94c09dd59c4427b418cb2ce7d030f Mon Sep 17 00:00:00 2001 From: Hhio618 Date: Sun, 25 Oct 2020 11:35:53 +0330 Subject: [PATCH 2/2] uncomment test_ingest_community_events_calender.py --- .../commands/test_ingest_community_events_calender.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/marketing/tests/management/commands/test_ingest_community_events_calender.py b/app/marketing/tests/management/commands/test_ingest_community_events_calender.py index f1008191060..75e07a104d8 100644 --- a/app/marketing/tests/management/commands/test_ingest_community_events_calender.py +++ b/app/marketing/tests/management/commands/test_ingest_community_events_calender.py @@ -47,7 +47,6 @@ def parse_ical_file(self, fname): with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), fname)) as f: return Calendar.from_ical(f.read()) -''' # These Tests don't actually work - DL class TestIngestCommunityEvents(TestCase): """Define tests for ingest community events. """ @@ -96,4 +95,3 @@ def test_handle_update(self): def tearDown(self): calendar, event = load_icalendar("test_ics_files/update.ics") UpcomingDate.objects.filter(title=event.get('summary')).delete() -'''