Skip to content

Commit

Permalink
new get meta in adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jan 23, 2017
1 parent d263f76 commit 8d52c3e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/eadapters/models/bag_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ def _build(cls, model, map):
embossing_s = embossing.replace("_", " ")
embossing_s = embossing_s.capitalize()
meta["embossing_s"] = embossing_s

def get_meta(self, normalize = True):
if not self.meta: return self.meta
meta = dict(self.meta)
if not normalize: return meta
for extra in ("embossing_s",):
if not extra in meta: continue
del meta[extra]
return meta

0 comments on commit 8d52c3e

Please sign in to comment.