Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
2df9990e
Commit
2df9990e
authored
2 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Use id of the respectie ExtraMark and ExcuseType object when using them as column aliases
parent
af849ace
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!324
Resolve "Property count_label of ExcuseType and ExtraMark allowing whitespaces in it breaks usage of it as column alias"
,
!323
Prepare release 3.0b0
Pipeline
#118890
canceled
2 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+8
-0
8 additions, 0 deletions
CHANGELOG.rst
aleksis/apps/alsijil/models.py
+4
-2
4 additions, 2 deletions
aleksis/apps/alsijil/models.py
with
12 additions
and
2 deletions
CHANGELOG.rst
+
8
−
0
View file @
2df9990e
...
@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
...
@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Fixed
~~~~~
* In some cases, pages showing the count of extra marks and lessons with custom excuse types of
persons threw an error.
`3.0b0`_ - 2022-02-28
`3.0b0`_ - 2022-02-28
---------------------
---------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/models.py
+
4
−
2
View file @
2df9990e
from
datetime
import
date
from
datetime
import
date
from
typing
import
Optional
,
Union
from
typing
import
Optional
,
Union
from
urllib.parse
import
urlparse
from
urllib.parse
import
urlparse
from
uuid
import
uuid4
from
django.db
import
models
from
django.db
import
models
from
django.db.models.constraints
import
CheckConstraint
from
django.db.models.constraints
import
CheckConstraint
from
django.db.models.query_utils
import
Q
from
django.db.models.query_utils
import
Q
from
django.urls
import
reverse
from
django.urls
import
reverse
from
django.utils.formats
import
date_format
from
django.utils.formats
import
date_format
from
django.utils.text
import
slugify
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.translation
import
gettext_lazy
as
_
from
calendarweek
import
CalendarWeek
from
calendarweek
import
CalendarWeek
...
@@ -66,7 +68,7 @@ class ExcuseType(ExtensibleModel):
...
@@ -66,7 +68,7 @@ class ExcuseType(ExtensibleModel):
@property
@property
def
count_label
(
self
):
def
count_label
(
self
):
return
f
"
{
self
.
short_name
}
_count
"
return
f
"
excuse_type_
{
self
.
id
}
_count
"
class
Meta
:
class
Meta
:
ordering
=
[
"
name
"
]
ordering
=
[
"
name
"
]
...
@@ -437,7 +439,7 @@ class ExtraMark(ExtensibleModel):
...
@@ -437,7 +439,7 @@ class ExtraMark(ExtensibleModel):
@property
@property
def
count_label
(
self
):
def
count_label
(
self
):
return
f
"
{
self
.
short_name
}
_count
"
return
f
"
extra_mark_
{
self
.
id
}
_count
"
class
Meta
:
class
Meta
:
ordering
=
[
"
short_name
"
]
ordering
=
[
"
short_name
"
]
...
...
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