From 37662bb946d4ad19d5750c8396cd94431fea9c7f Mon Sep 17 00:00:00 2001 From: TeriForey Date: Thu, 24 Jan 2019 13:50:18 +0000 Subject: [PATCH] Reset branch back to status on azerbini fork --- arches/app/models/entity.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/arches/app/models/entity.py b/arches/app/models/entity.py index 1a8b71e18e..ca755af081 100644 --- a/arches/app/models/entity.py +++ b/arches/app/models/entity.py @@ -30,14 +30,12 @@ from django.db import connection from django.db import transaction from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile -from django.core.files import File from arches.app.models.concept import Concept from arches.app.utils.betterJSONSerializer import JSONSerializer, JSONDeserializer from django.core.exceptions import ObjectDoesNotExist import __builtin__ import logging -import urllib class Entity(object): """ @@ -243,21 +241,6 @@ def _save(self): themodelinstance.save() self.value = themodelinstance.geturl() self.label = themodelinstance.getname() - else: - try: # Will download, open and upload file contents. If it's an S3 file, it will create a copy. - result = urllib.urlretrieve(self.value) - f = File(open(result[0], 'rb')) - if "AccessDenied" in f.read(): - raise Exception("File %s does not exist" % self.value) - f.seek(0) - themodelinstancefileattr = getattr(themodelinstance, columnname) - themodelinstancefileattr.save(self.label, f) - f.close() - themodelinstance.save() - self.value = themodelinstance.geturl() - self.label = themodelinstance.getname() - except: - pass for child_entity in self.child_entities: child = child_entity._save()