add rank for organization
This commit is contained in:
parent
14369170c6
commit
9aa50cf38e
|
@ -147,6 +147,7 @@ class Organization(models.Model):
|
|||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
admin_status = models.IntegerField('管理状态', default=3)
|
||||
# rank = models.IntegerField('排名', default=1)
|
||||
|
||||
class Meta:
|
||||
ordering = ["name"]
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -131,7 +131,6 @@ def delete_organization(request):
|
|||
o = Organization.objects.get(id=id)
|
||||
count1 = NewMedia.count(o.id)
|
||||
count2 = Userprofile.count(o.id)
|
||||
print(count1, count2)
|
||||
if count1 != 0 or count2 != 0:
|
||||
return JsonResponse({'status': 'error', 'message': '机构下有新媒体或管理未注销,无法删除'})
|
||||
if o.is_direct():
|
||||
|
@ -147,6 +146,7 @@ def delete_organization(request):
|
|||
send_tnps(phones, '审核', content)
|
||||
else:
|
||||
o.admin_status = 4
|
||||
o.save()
|
||||
admins = Userprofile.level2_admin(o.cities)
|
||||
content = '%s注销了机构,请审核' % (profile,)
|
||||
phones = []
|
||||
|
|
Loading…
Reference in New Issue