Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
ddf35c06
Commit
ddf35c06
authored
Jul 11, 2023
by
John Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add is_password_set field in account info response
parent
78a15166
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
account.py
api/controllers/console/workspace/account.py
+1
-0
account.py
api/models/account.py
+4
-0
No files found.
api/controllers/console/workspace/account.py
View file @
ddf35c06
...
...
@@ -22,6 +22,7 @@ account_fields = {
'name'
:
fields
.
String
,
'avatar'
:
fields
.
String
,
'email'
:
fields
.
String
,
'is_password_set'
:
fields
.
Boolean
,
'interface_language'
:
fields
.
String
,
'interface_theme'
:
fields
.
String
,
'timezone'
:
fields
.
String
,
...
...
api/models/account.py
View file @
ddf35c06
...
...
@@ -38,6 +38,10 @@ class Account(UserMixin, db.Model):
created_at
=
db
.
Column
(
db
.
DateTime
,
nullable
=
False
,
server_default
=
db
.
text
(
'CURRENT_TIMESTAMP(0)'
))
updated_at
=
db
.
Column
(
db
.
DateTime
,
nullable
=
False
,
server_default
=
db
.
text
(
'CURRENT_TIMESTAMP(0)'
))
@
property
def
is_password_set
(
self
):
return
self
.
password
is
not
None
@
property
def
current_tenant
(
self
):
return
self
.
_current_tenant
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment