Skip to content

Commit

Permalink
Deplace non fields in parser with attachmentparsermixin
Browse files Browse the repository at this point in the history
  • Loading branch information
LePetitTim committed Jan 8, 2019
1 parent 14fe20f commit 39345a2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions geotrek/tourism/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ApidaeParser(AttachmentParserMixin, Parser):
'published': True,
}
non_fields = {
'attachments': 'illustrations',
}
# Use for foreign keys. When the key is a foreign key, it will try to get the key's value.
# In django : 'category' : 'label' -> category.label
Expand Down Expand Up @@ -160,9 +161,6 @@ class TouristicEventApidaeParser(ApidaeParser):
'gestion.membreProprietaire.nom',
'illustrations'
]
non_fields = {
'attachments': 'illustrations',
}
m2m_fields = {
'themes': 'informationsFeteEtManifestation.themes.*.libelleFr'
}
Expand Down Expand Up @@ -316,9 +314,6 @@ class TouristicContentApidaeParser(ApidaeParser):
'gestion.membreProprietaire.nom',
),
}
non_fields = {
'attachments': 'illustrations',
}
natural_keys = {
'category': 'label',
'type1': 'label',
Expand Down

0 comments on commit 39345a2

Please sign in to comment.