From d42272ce63c06833845308513518c077e2db276a Mon Sep 17 00:00:00 2001 From: Femi Lamptey Date: Tue, 17 Apr 2018 15:15:28 +0000 Subject: [PATCH] Refactoring delete_event_searchable Removed unnecessary code --- events/models/events.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/events/models/events.py b/events/models/events.py index a5c48d4..5e0d7cb 100644 --- a/events/models/events.py +++ b/events/models/events.py @@ -187,14 +187,10 @@ def delete_event_searchable(event): try: searchable = Searchable.objects.get(event_uri=event_uri) + searchable.delete() except: - searchable = Searchable(event_uri) - searchable.origin_node = origin_url - searchable.federation_node = origin_url - searchable.federation_time = timezone.now() + pass - searchable.event_url = event_url - searchable.delete() def slugify(s, ok=SLUG_OK, lower=True, spaces=False): # L and N signify letter/number.