Skip to content
Snippets Groups Projects
Commit 5352ba93 authored by Matthieu Fesselier's avatar Matthieu Fesselier
Browse files

bugfix: improve subscription system

parent efb334eb
No related branches found
No related tags found
1 merge request!7feature: subscription system
Pipeline #1476 passed
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment