diff options
author | Dan McGee <dan@archlinux.org> | 2011-02-07 12:48:12 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-02-15 13:51:11 -0600 |
commit | 376ce4a69e016d13eff28589a5caa627bf7c451b (patch) | |
tree | 347ffffa3db13e4d8a4f3c49379e6e3c28139de1 /devel/management/commands | |
parent | 8c5358e88898c4eb620a132133c57a26f191dee1 (diff) |
Clean up Package related objects code
Main change is just to move groups from the default packagegroup_set
location to a related_name of groups. Also refer to the Package class
directly rather than by text string if we have it available.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management/commands')
-rw-r--r-- | devel/management/commands/reporead.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index e31478c5..bdd0882c 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -203,10 +203,10 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None): dbpkg.packagedepend_set.create(depname=dpname, depvcmp=dpvcmp) logger.debug('Added %s as dep for pkg %s', dpname, repopkg.name) - dbpkg.packagegroup_set.all().delete() + dbpkg.groups.all().delete() if 'groups' in repopkg.__dict__: for y in repopkg.groups: - dbpkg.packagegroup_set.create(name=y) + dbpkg.groups.create(name=y) def populate_files(dbpkg, repopkg, force=False): |