Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-CSVImport
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-CSVImport
Commits
50357b4e
Verified
Commit
50357b4e
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Ensure group membership. Related to BiscuIT-ng#60.
parent
3358da61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/schild_nrw/util.py
+5
-0
5 additions, 0 deletions
biscuit/apps/schild_nrw/util.py
with
5 additions
and
0 deletions
biscuit/apps/schild_nrw/util.py
+
5
−
0
View file @
50357b4e
...
...
@@ -31,6 +31,11 @@ def schild_import_csv_single(request: HttpRequest, csv: Union[BinaryIO, str], co
'
Failed to import person %s %s: %s
'
)
%
(
person_row
[
'
first_name
'
],
person_row
[
'
last_name
'
],
err
),
fail_silently
=
True
)
all_ok
=
False
# Ensure that newly set primary group is also in member_of
if
person
.
primary_group
and
person
.
primary_group
not
in
person
.
member_of
.
all
():
person
.
member_of
.
add
(
person
.
primary_group
)
person
.
save
()
if
all_ok
:
messages
.
success
(
request
,
_
(
'
All persons were imported successfully.
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment