dak/acl.py: raise an exception when an unknown selector is used

上级 a3380f76
......@@ -65,6 +65,8 @@ def get_fingerprint(entry, session):
q = q.filter(Fingerprint.fingerprint == value)
elif field == 'keyring':
q = q.join(Fingerprint.keyring).filter(Keyring.keyring_name == value)
else:
raise Exception('Unknown selector "{0}".'.format(field))
return q.all()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册