only write if set

1659-notification-format
dgtlmoon 2 years ago
parent 15b1baaa24
commit bc710a5875

@ -205,8 +205,9 @@ def live_server_setup(live_server):
with open("test-datastore/notification-url.txt", "w") as f: with open("test-datastore/notification-url.txt", "w") as f:
f.write(request.url) f.write(request.url)
with open("test-datastore/notification-content-type.txt", "w") as f: if request.content_type:
f.write(request.content_type) with open("test-datastore/notification-content-type.txt", "w") as f:
f.write(request.content_type)
print("\n>> Test notification endpoint was hit.\n", data) print("\n>> Test notification endpoint was hit.\n", data)
return "Text was set" return "Text was set"

Loading…
Cancel
Save