Commits

Yohan Boniface committed 976ec1c

Fix broken import from URL

Comments (0)

Files changed (2)

leaflet_storage/tests/views.py

         )
         post_data = {
             'category': self.category.pk,
-            'data_file': "file://%s" % fixture_path,
+            'data_url': "file://%s" % fixture_path,
             'content_type': 'geojson'
         }
         self.client.login(username=self.user.username, password="123123")

leaflet_storage/views.py

             ('description', 'desc'),
             'color'
         ]
-        features = form.cleaned_data.get('data_file', form.cleaned_data.get('data_url'))
+        features = form.cleaned_data.get('data_file') or form.cleaned_data.get('data_url')
         category = form.cleaned_data.get('category')
         counter = 0
         for feature in features: