forked from 0x2620/pandora
Item no longer imported in archive.models
This commit is contained in:
parent
a818b29799
commit
aafb513492
1 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ from ox.django.views import task_status
|
||||||
|
|
||||||
from app.models import site_config
|
from app.models import site_config
|
||||||
from item import utils
|
from item import utils
|
||||||
from item.models import get_item
|
from item.models import get_item, Item
|
||||||
from item.views import parse_query
|
from item.views import parse_query
|
||||||
import item.tasks
|
import item.tasks
|
||||||
from api.actions import actions
|
from api.actions import actions
|
||||||
|
@ -247,8 +247,8 @@ def moveFiles(request):
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
data = json.loads(request.POST['data'])
|
data = json.loads(request.POST['data'])
|
||||||
if models.Item.objects.filter(itemId=data['itemId']).count() == 1:
|
if Item.objects.filter(itemId=data['itemId']).count() == 1:
|
||||||
i = models.Item.objects.get(itemId=data['itemId'])
|
i = Item.objects.get(itemId=data['itemId'])
|
||||||
else:
|
else:
|
||||||
if len(data['itemId']) != 7:
|
if len(data['itemId']) != 7:
|
||||||
del data['itemId']
|
del data['itemId']
|
||||||
|
@ -268,7 +268,7 @@ def moveFiles(request):
|
||||||
f.item = i
|
f.item = i
|
||||||
f.save()
|
f.save()
|
||||||
for itemId in changed:
|
for itemId in changed:
|
||||||
c = models.Item.objects.get(itemId=itemId)
|
c = Item.objects.get(itemId=itemId)
|
||||||
if c.files.count() == 0:
|
if c.files.count() == 0:
|
||||||
c.delete()
|
c.delete()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue