Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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-Core
Commits
aebb9bf5
Verified
Commit
aebb9bf5
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Use a set for the data check registry to prevent double entries
parent
f493f004
Branches
prepare-release-2.7.1
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!649
Resolve "Register data checks only one time"
Pipeline
#15251
passed
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.rst
+1
-0
1 addition, 0 deletions
CHANGELOG.rst
aleksis/core/apps.py
+2
-2
2 additions, 2 deletions
aleksis/core/apps.py
aleksis/core/data_checks.py
+1
-1
1 addition, 1 deletion
aleksis/core/data_checks.py
with
4 additions
and
3 deletions
CHANGELOG.rst
+
1
−
0
View file @
aebb9bf5
...
...
@@ -20,6 +20,7 @@ Fixed
~~~~~
* Fix installation documentation (nginx, uWSGI).
* Use a set for data checks registry to prevent double entries.
Removed
~~~~~~~
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/apps.py
+
2
−
2
View file @
aebb9bf5
...
...
@@ -74,9 +74,9 @@ class CoreConfig(AppConfig):
"""
Get all data checks from all loaded models.
"""
from
aleksis.core.data_checks
import
DataCheckRegistry
data_checks
=
[]
data_checks
=
set
()
for
model
in
apps
.
get_models
():
data_checks
+=
getattr
(
model
,
"
data_checks
"
,
[])
data_checks
.
update
(
getattr
(
model
,
"
data_checks
"
,
[])
)
DataCheckRegistry
.
data_checks
=
data_checks
def
preference_updated
(
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/data_checks.py
+
1
−
1
View file @
aebb9bf5
...
...
@@ -225,7 +225,7 @@ class DataCheck:
class
DataCheckRegistry
:
"""
Create central registry for all data checks in AlekSIS.
"""
data_checks
=
[]
data_checks
:
set
=
set
()
@classproperty
def
data_checks_by_name
(
cls
):
...
...
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