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