Skip to content

Commit

Permalink
Separate get_tagged_fields back into its own function. #229
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Jun 17, 2016
1 parent cd4cebc commit a5cbc2d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions grow/pods/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ def default_locale(self):

@webapp2.cached_property
def fields(self):
format_obj = formats.Format.get(self)
tagged_fields = format_obj.fields
tagged_fields = self.get_tagged_fields()
fields = utils.untag_fields(tagged_fields)
return {} if not fields else fields

def get_tagged_fields(self):
format_obj = formats.Format.get(self)
return format_obj.fields

@webapp2.cached_property
def format(self):
return formats.Format.get(self)
Expand Down

0 comments on commit a5cbc2d

Please sign in to comment.