update to django 2.0

This commit is contained in:
virusdefender
2019-03-11 11:25:10 +08:00
parent f7bd9f16b4
commit 6b7654a0c3
18 changed files with 69 additions and 53 deletions

View File

@@ -46,6 +46,6 @@ class SubmissionListSerializer(serializers.ModelSerializer):
def get_show_link(self, obj):
# 没传user或为匿名user
if self.user is None or not self.user.is_authenticated():
if self.user is None or not self.user.is_authenticated:
return False
return obj.check_user_permission(self.user)