summaryrefslogtreecommitdiffstats
path: root/api/database
diff options
context:
space:
mode:
Diffstat (limited to 'api/database')
-rw-r--r--api/database/v2/handlers.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/database/v2/handlers.py b/api/database/v2/handlers.py
index 7aa02a0a5..44c14df61 100644
--- a/api/database/v2/handlers.py
+++ b/api/database/v2/handlers.py
@@ -122,6 +122,12 @@ class V2ContainerHandler(object):
raise ValueError
return container
+ def update_attr(self, uuid, attr):
+ container = self.get_by_uuid(uuid)
+ for k, v in attr.items():
+ setattr(container, k, v)
+ db_session.commit()
+
def delete_by_uuid(self, uuid):
container = self.get_by_uuid(uuid)
db_session.delete(container)