diff --git a/src/Ui/UiWebsocket.py b/src/Ui/UiWebsocket.py
index 10f2422f..e1df4366 100644
--- a/src/Ui/UiWebsocket.py
+++ b/src/Ui/UiWebsocket.py
@@ -461,10 +461,11 @@ class UiWebsocket(object):
if privatekey == "stored": # Get privatekey from sites.json
privatekey = self.user.getSiteData(self.site.address).get("privatekey")
- self.cmd("notification", ["error", _["Content signing failed"] + "
Private key not found in sites.json "])
- self.response(to, {"error": "Site sign failed: Private key not stored."})
- self.log.error("Site sign failed: %s: Private key not stored in sites.json" % inner_path)
- return
+ if not privatekey:
+ self.cmd("notification", ["error", _["Content signing failed"] + "
Private key not found in sites.json "])
+ self.response(to, {"error": "Site sign failed: Private key not stored."})
+ self.log.error("Site sign failed: %s: Private key not stored in sites.json" % inner_path)
+ return
if not privatekey: # Get privatekey from users.json auth_address
privatekey = self.user.getAuthPrivatekey(self.site.address)