Skip to content

Commit

Permalink
TGIS: fix semantic label (#2215)
Browse files Browse the repository at this point in the history
 * fix detection of a shortcut or band identifier
 * do not modify the provided semantic label if it contains `_`
  • Loading branch information
metzm committed Feb 16, 2022
1 parent b441deb commit 843ffae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/grass/temporal/abstract_space_time_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ def leading_zero(value):
else:
return "{0:02d}".format(int(value))
except ValueError:
return value
return None

return None

Expand All @@ -1550,8 +1550,8 @@ def leading_zero(value):

# be case-insensitive
if "_" in self.semantic_label:
# fully-qualified semantic label
where += "semantic_label IN ('{}'".format(self.semantic_label.upper())
# fully-qualified semantic label, do not modify
where += "semantic_label IN ('{}'".format(self.semantic_label)

# be zero-padding less sensitive
shortcut, identifier = self.semantic_label.split("_", -1)
Expand Down

0 comments on commit 843ffae

Please sign in to comment.