mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 05:01:48 +02:00
Deactivated users are supported
This commit is contained in:
parent
0ed3cd8e5b
commit
7f6a680985
3 changed files with 5 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -11,4 +11,4 @@ build
|
|||
.vscode
|
||||
.env
|
||||
.pytest_cache
|
||||
.idea/
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
{% include "display_errors.html" %}
|
||||
{{ form.hidden_tag() }}
|
||||
{{ form.file }}
|
||||
{{ form.csrf_token() }}
|
||||
<div class="actions">
|
||||
<button class="btn btn-primary">{{ _("Import") }}</button>
|
||||
</div>
|
||||
|
|
|
@ -418,16 +418,16 @@ def upload_json():
|
|||
def import_project(file):
|
||||
# From json : export list of members
|
||||
json_file = json.load(open(file))
|
||||
members = get_members(json_file)
|
||||
active_members = g.project.active_members
|
||||
members_json = get_members(json_file)
|
||||
members = g.project.members
|
||||
members_already_here = list()
|
||||
for m in active_members:
|
||||
for m in members:
|
||||
members_already_here.append(str(m))
|
||||
|
||||
# List all members not in the project and weight associated
|
||||
# List of tuples (name,weight)
|
||||
members_to_add = list()
|
||||
for i in members:
|
||||
for i in members_json:
|
||||
if str(i[0]) not in members_already_here:
|
||||
members_to_add.append(i)
|
||||
|
||||
|
|
Loading…
Reference in a new issue