summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/chimere/models.py b/chimere/models.py
index aa291ca..e54edfc 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -629,17 +629,17 @@ class Route(GeographicItem):
verbose_name = _(u"Route")
def get_init_multi(self):
- if not self.associated_file:
+ if not self.associated_marker.count():
return []
multis = [forms.model_to_dict(multi)
- for multi in self.associated_file.multimedia_files.all()]
+ for multi in self.associated_marker.all()[0].multimedia_files.all()]
return multis
def get_init_picture(self):
- if not self.associated_file:
+ if not self.associated_marker.count():
return []
picts = [forms.model_to_dict(pict)
- for pict in self.associated_file.pictures.all()]
+ for pict in self.associated_marker.all()[0].pictures.all()]
return picts
def getProperty(self, propertymodel, safe=None):