On remplace "Autre" par "Sans catégorie"
This commit is contained in:
@@ -13,9 +13,9 @@ class CExtractor(TwoStepsExtractor):
|
||||
mapping = {
|
||||
"Théâtre": "Théâtre",
|
||||
"Danse": "Danse",
|
||||
"Rencontre": "Autre",
|
||||
"Sortie de résidence": "Autre",
|
||||
"PopCorn Live": "Autre",
|
||||
"Rencontre": "Sans catégorie",
|
||||
"Sortie de résidence": "Sans catégorie",
|
||||
"PopCorn Live": "Sans catégorie",
|
||||
}
|
||||
if category in mapping:
|
||||
return mapping[category]
|
||||
|
||||
@@ -10,11 +10,11 @@ class CExtractor(TwoStepsExtractor):
|
||||
mapping = {
|
||||
"Musique": "Concert",
|
||||
"CONCERT": "Concert",
|
||||
"VISITE": "Autre",
|
||||
"VISITE": "Sans catégorie",
|
||||
"Spectacle": "Théâtre",
|
||||
"Rencontre": "Autre",
|
||||
"Atelier": "Autre",
|
||||
"Projection": "Autre",
|
||||
"Rencontre": "Sans catégorie",
|
||||
"Atelier": "Sans catégorie",
|
||||
"Projection": "Sans catégorie",
|
||||
}
|
||||
if category in mapping:
|
||||
return mapping[category]
|
||||
|
||||
@@ -714,9 +714,12 @@ class Event(models.Model):
|
||||
|
||||
def from_structure(event_structure, import_source=None):
|
||||
if "category" in event_structure and event_structure["category"] is not None:
|
||||
event_structure["category"] = Category.objects.get(
|
||||
name=event_structure["category"]
|
||||
)
|
||||
try:
|
||||
event_structure["category"] = Category.objects.get(
|
||||
name=event_structure["category"]
|
||||
)
|
||||
except Category.DoesNotExist:
|
||||
event_structure["category"] = Category.get_default_category()
|
||||
|
||||
if "published" in event_structure and event_structure["published"] is not None:
|
||||
if event_structure["published"]:
|
||||
|
||||
Reference in New Issue
Block a user