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
0ff00be9
Verified
Commit
0ff00be9
authored
2 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix wrongly rewritten get_app_module"
This reverts commit
18db7a08
.
parent
18db7a08
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1047
Draft: Resolve "[3.0] Introduce Graphene/GraphQL"
,
!1045
Introduce Vuetify and GraphQL
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/util/core_helpers.py
+4
-4
4 additions, 4 deletions
aleksis/core/util/core_helpers.py
with
4 additions
and
4 deletions
aleksis/core/util/core_helpers.py
+
4
−
4
View file @
0ff00be9
...
...
@@ -73,17 +73,17 @@ def get_app_packages(only_official: bool = False) -> Sequence[str]:
def
get_app_module
(
app
:
str
,
name
:
str
)
->
Optional
[
ModuleType
]:
"""
Get
a named
module of an app.
"""
"""
Get
the settings
module of an app.
"""
pkg
=
"
.
"
.
join
(
app
.
split
(
"
.
"
)[:
-
2
])
mod_settings
=
None
while
"
.
"
in
pkg
:
try
:
return
import_module
(
f
"
{
pkg
}
.
{
name
}
"
)
return
import_module
(
f
"
{
app
}
.
{
name
}
"
)
except
ImportError
:
# Import errors are non-fatal.
pkg
=
"
.
"
.
join
(
pkg
.
split
(
"
.
"
)[:
-
1
])
# The app does not have
this module
# The app does not have
settings
return
None
...
...
This diff is collapsed.
Click to expand it.
Nik | Klampfradler
@nik
mentioned in commit
92ae6250
·
2 years ago
mentioned in commit
92ae6250
mentioned in commit 92ae625021964ffaafa2eab2edfbaad5a96655d8
Toggle commit list
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