Skip to content
Browse files

Fixed bug in myplugins

  • Loading branch information...
1 parent 9827f56 commit 0efbf623203422d3a64c957ba407d63119ae97df @elpaso elpaso committed Oct 11, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −0 qgis-app/plugins/models.py
  2. +2 −0 qgis-app/plugins/templatetags/range_filter.py
  3. +1 −1 qgis-app/plugins/views.py
View
1 qgis-app/plugins/models.py
@@ -173,6 +173,7 @@ class Plugin (models.Model):
# Managers
objects = models.Manager()
+ base_objects = BasePluginManager()
approved_objects = ApprovedPlugins()
stable_objects = StablePlugins()
experimental_objects = ExperimentalPlugins()
View
2 qgis-app/plugins/templatetags/range_filter.py
@@ -21,4 +21,6 @@ def get_range( value ):
Instead of 3 one may use the variable set in the views
"""
+ if not value:
+ value = 0
return range( value )
View
2 qgis-app/plugins/views.py
@@ -387,7 +387,7 @@ def my_plugins(request):
"""
Shows user's plugins (plugins where user is in owners or user is author)
"""
- queryset = Plugin.objects.filter(owners=request.user).distinct() | Plugin.objects.filter(created_by=request.user).distinct()
+ queryset = Plugin.base_objects.filter(owners=request.user).distinct() | Plugin.objects.filter(created_by=request.user).distinct()
return plugins_list(request, queryset, template_name = 'plugins/plugin_list_my.html', extra_context = { 'title' : _('My plugins')})

0 comments on commit 0efbf62

Please sign in to comment.
Something went wrong with that request. Please try again.