diff options
author | Dan McGee <dan@archlinux.org> | 2012-03-26 19:33:28 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-26 19:33:28 +0200 |
commit | 611e30172ae8db58fc2f6146fd1bee428e55ea6a (patch) | |
tree | 0e4630d36639d6f6f25e861803d35f48301de672 /packages | |
parent | 493092f88f03ae7ec385f76abeeb51516ff888e3 (diff) | |
download | archweb-611e30172ae8db58fc2f6146fd1bee428e55ea6a.tar.gz archweb-611e30172ae8db58fc2f6146fd1bee428e55ea6a.tar.xz |
Rename 'packagedepend_set' attribute to 'depends'
We do this for every other related package attribute, so do it here too.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/views/__init__.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py index a915d58..afb1de3 100644 --- a/packages/views/__init__.py +++ b/packages/views/__init__.py @@ -31,7 +31,7 @@ class PackageJSONEncoder(DjangoJSONEncoder): 'installed_size', 'build_date', 'last_update', 'flag_date', 'maintainers', 'packager' ] pkg_list_attributes = [ 'groups', 'licenses', 'conflicts', - 'provides', 'replaces', 'packagedepend_set' ] + 'provides', 'replaces', 'depends' ] def default(self, obj): if hasattr(obj, '__iter__'): @@ -41,11 +41,7 @@ class PackageJSONEncoder(DjangoJSONEncoder): data = dict((attr, getattr(obj, attr)) for attr in self.pkg_attributes) for attr in self.pkg_list_attributes: - values = getattr(obj, attr).all() - # TODO: temporary rename becuase the name sucks - if attr == 'packagedepend_set': - attr = 'depends' - data[attr] = values + data[attr] = getattr(obj, attr).all() return data if isinstance(obj, PackageFile): filename = obj.filename or '' |