bugfix: improve subscription system
This commit is contained in:
parent
efb334ebc4
commit
5352ba938a
@ -51,11 +51,11 @@ def send_notification(sender, instance, **kwargs):
|
||||
process = Thread(target=send_request, args=[subscription.inbox, url])
|
||||
process.start()
|
||||
threads.append(process)
|
||||
def send_request(target, object):
|
||||
def send_request(target, objectIri):
|
||||
try:
|
||||
req=requests.post(target,
|
||||
json={"@context":"https://cdn.happy-dev.fr/owl/hdcontext.jsonld",
|
||||
"object": object, "type": "system", "read": False},
|
||||
"object": objectIri, "type": "update"},
|
||||
headers={"Content-Type": "application/ld+json"})
|
||||
except:
|
||||
logging.error('Djangoldp_notifications: Error with request')
|
||||
|
Loading…
Reference in New Issue
Block a user