Skip to content

Commit

Permalink
Merge pull request #3797 from camptocamp/fix223
Browse files Browse the repository at this point in the history
Fix tow variable with the same name
  • Loading branch information
sbrunner authored Jun 6, 2018
2 parents dd9fdcb + 2df3e8e commit 50d7077
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions c2cgeoportal/lib/lingua_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def _collect_app_config(cls, config, filename):
value.encode("ascii", errors="replace") if isinstance(value, unicode) else value)
enums.append(Message(None, msgid, None, [], u"", u"", (filename, location)))

metadata = []
metadata_list = []
defs = config["vars"]["admin_interface"]["available_metadata"]
names = [e["name"] for e in defs if e.get("translate", False)]

Expand All @@ -251,9 +251,11 @@ def _collect_app_config(cls, config, filename):
.filter(c2cgeoportal.models.Metadata.name.in_(names))
for metadata in query.all():
location = "metadata/{}/{}".format(metadata.name, metadata.id)
metadata.append(Message(None, metadata.value, None, [], u"", u"", (filename, location)))
metadata_list.append(
Message(None, metadata.value, None, [], u"", u"", (filename, location))
)

return raster + enums + metadata
return raster + enums + metadata_list

@classmethod
def _enumerate_attributes_values(cls, dbsessions, layers, layerinfos, fieldname):
Expand Down

0 comments on commit 50d7077

Please sign in to comment.