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
28199a3d
Commit
28199a3d
authored
4 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Remove check for bool
parent
2e65c121
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!246
Resolve "Add predicate that checks for a preference"
Pipeline
#1926
passed with warnings
4 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/util/predicates.py
+1
-3
1 addition, 3 deletions
aleksis/core/util/predicates.py
with
1 addition
and
3 deletions
aleksis/core/util/predicates.py
+
1
−
3
View file @
28199a3d
...
...
@@ -73,9 +73,7 @@ def is_site_preference_set(section: str, pref: str):
@predicate
(
name
)
def
fn
()
->
bool
:
if
isinstance
(
get_site_preferences
()[
f
"
{
section
}
__
{
pref
}
"
],
bool
):
return
get_site_preferences
()[
f
"
{
section
}
__
{
pref
}
"
]
return
False
return
bool
(
get_site_preferences
()[
f
"
{
section
}
__
{
pref
}
"
])
return
fn
...
...
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