Commit 7dbdaacd authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Return resource object upon creation

parent fd88c098
......@@ -111,8 +111,8 @@ class Command(BaseCommand):
for resource in resources:
if not isinstance(resource, dict):
raise CommandError("Malformed resource dict.")
exists = add_resource(s, resource)
name = resource['name']
r, exists = add_resource(s, resource)
name =
if exists:
m = "Resource '%s' updated in database.\n" % (name)
......@@ -70,7 +70,7 @@ def add_resource(service, resource_dict):"Updated resource %s." % (name))
else:"Added resource %s." % (name))
return exists
return r, exists
def update_resource(resource, uplimit):
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