fix: target
This commit is contained in:
parent
3e9b8a595f
commit
1e184776a4
@ -220,6 +220,9 @@ def send_email_on_notification(sender, instance, created, **kwargs):
|
||||
# get identifier for resource triggering notification, and store in where
|
||||
try:
|
||||
if instance.object.startswith(settings.SITE_URL):
|
||||
if hasattr(Model.resolve_id(instance.object.replace(settings.SITE_URL, '')), 'get_full_name'):
|
||||
where = Model.resolve_id(instance.object.replace(settings.SITE_URL, '')).get_full_name()
|
||||
else:
|
||||
where = str(Model.resolve_id(instance.object.replace(settings.SITE_URL, '')).name)
|
||||
else:
|
||||
where = requests.get(instance.object).json()['name']
|
||||
|
Loading…
Reference in New Issue
Block a user