Skip to content

Commit

Permalink
Merge pull request #2271 from Geoportail-Luxembourg/report_public_cat…
Browse files Browse the repository at this point in the history
…egories_23

Public categories defined in DB
  • Loading branch information
rmichaelis authored Jul 24, 2019
2 parents e4cf109 + f280f2b commit b2dca3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions geoportal/geoportailv3_geoportal/mymaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions geoportal/geoportailv3_geoportal/views/mymaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit b2dca3f

Please sign in to comment.