diff --git a/geoportal/geoportailv3_geoportal/mymaps.py b/geoportal/geoportailv3_geoportal/mymaps.py index c1a955981..a9eb6c366 100644 --- a/geoportal/geoportailv3_geoportal/mymaps.py +++ b/geoportal/geoportailv3_geoportal/mymaps.py @@ -280,6 +280,7 @@ class Category(Base): id = Column(Integer, primary_key=True) name = Column(Unicode(255)) allow_labeling = Column(Boolean) + list = Column(Boolean) def __init__(self, name): self.name = name diff --git a/geoportal/geoportailv3_geoportal/views/mymaps.py b/geoportal/geoportailv3_geoportal/views/mymaps.py index 733f4306b..afe47b04e 100644 --- a/geoportal/geoportailv3_geoportal/views/mymaps.py +++ b/geoportal/geoportailv3_geoportal/views/mymaps.py @@ -335,12 +335,7 @@ def public_categories(self): db_mymaps = self.db_mymaps categories = self.db_mymaps.query(Category) categories = categories.filter(Category.id != 999).\ - filter(Category.id.in_( - db_mymaps.query(RoleCategories.category_id).filter( - ~or_(and_(RoleCategories.category_id >= 70, - RoleCategories.category_id <= 80), - and_(RoleCategories.category_id >= 200, - RoleCategories.category_id <= 302))).all())) + filter(Category.list == True) # noqa categories = categories.order_by("name asc") categ = [] for category in categories.all():