mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Update src/yunohost/app.py
Co-authored-by: Kayou <pierre@kayou.io>
This commit is contained in:
parent
ddb2be23a2
commit
db93307fea
1 changed files with 6 additions and 0 deletions
|
@ -2683,6 +2683,12 @@ class UserArgumentParser(YunoHostArgumentFormatParser):
|
||||||
|
|
||||||
question = super(UserArgumentParser, self).parse_question(question, user_answers)
|
question = super(UserArgumentParser, self).parse_question(question, user_answers)
|
||||||
question.choices = user_list()["users"]
|
question.choices = user_list()["users"]
|
||||||
|
if question.default is None:
|
||||||
|
root_mail = "root@%s" % _get_maindomain()
|
||||||
|
for user in question.choices.keys():
|
||||||
|
if root_mail in user_info(user)["mail-aliases"]:
|
||||||
|
question.default = user
|
||||||
|
break
|
||||||
|
|
||||||
return question
|
return question
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue