Commit 3d13fa40 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Do not create entity in issue_commission.

parent 68b5beb0
......@@ -200,8 +200,6 @@ class QuotaholderAPI(Specificator):
target = Entity,
key = Key,
clientkey = ClientKey,
owner = Owner,
ownerkey = OwnerKey,
name = Text(default=''),
provisions = ListOf(Entity, Resource, Quantity)
):
......
......@@ -326,21 +326,14 @@ class QuotaholderDjangoDBCallpoint(Callpoint):
clientkey = None,
target = None,
key = None,
owner = None,
ownerkey = None,
name = None,
provisions = () ):
try:
t = Entity.objects.get(entity=target)
except Entity.DoesNotExist:
create_entity = ((target, owner, key, ownerkey),)
rejected = self.create_entity(context = context,
create_entity = create_entity)
if rejected:
raise NoEntityError("No target entity '%s'" % (target,))
t = Entity.objects.get(entity=target)
m = "No target entity '%s'" % (target,)
raise NoEntityError(m)
else:
if t.key != key:
m = "Invalid key for target entity '%s'" % (target,)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment