Skip to content

Commit

Permalink
Merge pull request #165 from opengisch/sanitize_picture_name
Browse files Browse the repository at this point in the history
Sanitize default picture name format
  • Loading branch information
m-kuhn authored Jul 23, 2020
2 parents 8313ce3 + fb49a6f commit 8de959c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qfieldsync/core/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def action(self, action):
self._action = action

def photo_naming(self, field_name: str) -> str:
return self._photo_naming.get(field_name, "'DCIM/{}_'||now()||'.jpg'".format(slugify(self.layer.name())))
return self._photo_naming.get(field_name, "'DCIM/{layername}_' || format_date(now(),'yyyyMMddhhmmsszzz') || '.jpg'".format(layername=slugify(self.layer.name())))

def set_photo_naming(self, field_name: str, expression: str):
self._photo_naming[field_name] = expression
Expand Down

0 comments on commit 8de959c

Please sign in to comment.