don't crash if a location belonging to a report was deleted
This commit is contained in:
parent
dddd88d2cc
commit
fe0834e0c9
1 changed files with 2 additions and 0 deletions
|
@ -142,6 +142,8 @@ class Report(models.Model):
|
|||
return None
|
||||
elif self.category == 'location-issue':
|
||||
location = self.location_specific
|
||||
if location is None:
|
||||
return None
|
||||
url_name = 'editor.%s.edit' % location.__class__._meta.default_related_name
|
||||
if isinstance(location, SpaceGeometryMixin):
|
||||
return reverse(url_name, kwargs={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue