diff options
author | 2009-07-30 16:03:44 +0200 | |
---|---|---|
committer | 2009-07-30 18:57:50 +0200 | |
commit | 75696818c935b796084397f235b9f46224b81f50 (patch) | |
tree | da71ca3c697d4e6728d0e6945e49e4d011d9b88a | |
parent | Added function to db layer to get package version (diff) | |
download | collagen-75696818c935b796084397f235b9f46224b81f50.tar.gz collagen-75696818c935b796084397f235b9f46224b81f50.tar.bz2 collagen-75696818c935b796084397f235b9f46224b81f50.zip |
[db] Fixed issue with adding useflags to package properties
clearing in the beginning and saving afterwards to make sure it gets saved
-rw-r--r-- | src/matchbox/db/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/matchbox/db/__init__.py b/src/matchbox/db/__init__.py index 347236a..23821be 100644 --- a/src/matchbox/db/__init__.py +++ b/src/matchbox/db/__init__.py @@ -266,10 +266,11 @@ class DjangoDB(object): @dbquery def add_useflags_to_packageproperies(self, packageproperties_id, useflag_ids): pp = PackageProperties.objects.get(pk=packageproperties_id) - + pp.useflags.clear() for id in useflag_ids: useflag = Useflag.objects.get(pk=id) pp.useflags.add(useflag) + pp.save() @dbquery def add_contents_to_packageproperties(self, packageproperties_id, contents): |