stash
This commit is contained in:
parent
82a27ce2a8
commit
3b494dfa37
8 changed files with 112 additions and 10 deletions
|
|
@ -130,7 +130,8 @@ def getUserInfo(request):
|
|||
return Response({'profile_picture_id': 'File does not exist.'}, status=400)
|
||||
user.save()
|
||||
|
||||
if old_file and old_file != user.profile_picture and old_file.connected_items.count() == 0 and old_file.profile_picture_users.count() == 0:
|
||||
if old_file and old_file != user.profile_picture and old_file.connected_items.count() == 0 \
|
||||
and old_file.profile_picture_users.count() == 0 and old_file.staged_by_workflows.count() == 0:
|
||||
old_file.delete()
|
||||
|
||||
return Response({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue