Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nk20-scripts
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20-scripts
Commits
4984159a
Commit
4984159a
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Improve activity interface
parent
3806feb6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
management/commands/import_activities.py
+3
-2
3 additions, 2 deletions
management/commands/import_activities.py
with
3 additions
and
2 deletions
management/commands/import_activities.py
+
3
−
2
View file @
4984159a
...
...
@@ -40,7 +40,8 @@ class Command(ImportCommand):
cur
.
execute
(
"
SELECT * FROM activites ORDER by id
"
)
n
=
cur
.
rowcount
bulk_mgr
=
BulkCreateManager
(
chunk_size
=
chunk
)
activity_type_id
=
ActivityType
.
objects
.
get
(
name
=
"
Pot
"
).
pk
# Need to be fixed manually
pot_id
=
ActivityType
.
objects
.
get
(
name
=
"
Pot
"
).
pk
club_id
=
ActivityType
.
objects
.
get
(
name
=
"
Soirée de club
"
).
pk
kfet
=
Club
.
objects
.
get
(
name
=
"
Kfet
"
)
pk_activity
=
1
for
idx
,
row
in
enumerate
(
cur
):
...
...
@@ -64,7 +65,7 @@ class Command(ImportCommand):
"
name
"
:
row
[
"
titre
"
],
"
description
"
:
row
[
"
description
"
],
"
location
"
:
row
[
"
lieu
"
],
"
activity_type_id
"
:
activity_type_id
,
# By default Pot
"
activity_type_id
"
:
pot_id
if
row
[
"
liste
"
]
else
club_id
,
"
creater_id
"
:
NoteUser
.
objects
.
get
(
pk
=
note
).
user
.
id
,
"
organizer_id
"
:
organizer
.
pk
,
"
attendees_club_id
"
:
kfet
.
pk
,
# Maybe fix manually
...
...
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