Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
videoag
backend
Commits
23b65dba
Commit
23b65dba
authored
3 months ago
by
Simon Künzel
Browse files
Options
Downloads
Patches
Plain Diff
Add cause user id to field change events
parent
098b813e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#7544
passed
3 months ago
Stage: build
Stage: run
Pipeline: backend
#7545
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
common_py/src/videoag_common/api_object/object_class.py
+4
-2
4 additions, 2 deletions
common_py/src/videoag_common/api_object/object_class.py
common_py/src/videoag_common/objects/job.py
+3
-2
3 additions, 2 deletions
common_py/src/videoag_common/objects/job.py
with
7 additions
and
4 deletions
common_py/src/videoag_common/api_object/object_class.py
+
4
−
2
View file @
23b65dba
...
@@ -449,7 +449,8 @@ class ApiObjectClass:
...
@@ -449,7 +449,8 @@ class ApiObjectClass:
"
field_id
"
:
field_id
,
"
field_id
"
:
field_id
,
"
old_value
"
:
old_value_json
,
"
old_value
"
:
old_value_json
,
"
new_value
"
:
new_value_json
,
"
new_value
"
:
new_value_json
,
}
},
cause_user_id
=
modifying_user_id
))
))
for
child_class_id
,
child_ids
in
children_ids_by_child_class_id
.
items
():
for
child_class_id
,
child_ids
in
children_ids_by_child_class_id
.
items
():
for
child_id
in
child_ids
:
for
child_id
in
child_ids
:
...
@@ -462,7 +463,8 @@ class ApiObjectClass:
...
@@ -462,7 +463,8 @@ class ApiObjectClass:
"
field_id
"
:
field_id
,
"
field_id
"
:
field_id
,
"
old_value
"
:
old_value_json
,
"
old_value
"
:
old_value_json
,
"
new_value
"
:
new_value_json
,
"
new_value
"
:
new_value_json
,
}
},
cause_user_id
=
modifying_user_id
))
))
expected_keys
.
discard
(
field_id
)
expected_keys
.
discard
(
field_id
)
...
...
This diff is collapsed.
Click to expand it.
common_py/src/videoag_common/objects/job.py
+
3
−
2
View file @
23b65dba
...
@@ -114,14 +114,15 @@ class Job(ApiObject, Base):
...
@@ -114,14 +114,15 @@ class Job(ApiObject, Base):
)
)
@staticmethod
@staticmethod
def
create_event
(
event_type
:
str
,
event_data
:
JsonTypes
,
cause_job_id
:
int
or
None
=
None
):
def
create_event
(
event_type
:
str
,
event_data
:
JsonTypes
,
cause_job_id
:
int
or
None
=
None
,
cause_user_id
:
int
or
None
=
None
):
return
Job
(
return
Job
(
type
=
"
handle_event
"
,
type
=
"
handle_event
"
,
input_data
=
{
input_data
=
{
"
type
"
:
event_type
,
"
type
"
:
event_type
,
"
data
"
:
event_data
"
data
"
:
event_data
},
},
cause_job_id
=
cause_job_id
cause_job_id
=
cause_job_id
,
cause_user_id
=
cause_user_id
,
)
)
def
set_error
(
self
,
error_code
:
str
,
error_message
:
str
or
None
=
None
):
def
set_error
(
self
,
error_code
:
str
,
error_message
:
str
or
None
=
None
):
...
...
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