Update 13-write-solid-python-codes-part-2.md

修改`deactivate`函数`is_active`为`False`
This commit is contained in:
Zhaoyz 2020-10-09 16:09:30 +08:00 committed by GitHub
parent 358e4ccb6b
commit f884c6d9c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class User(Model):
def deactivate(self):
"""停用当前用户
"""
self.is_active = True
self.is_active = False
self.save()
class Admin(User):