Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Merge requests
!152
Fix soge credit deletion when the account is not validated yet
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix soge credit deletion when the account is not validated yet
beta
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
ynerant
requested to merge
beta
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Signed-off-by: Yohann D'ANELLO
ynerant@crans.org
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
b597a6ac
1 commit,
4 years ago
1 file
+
8
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
apps/treasury/models.py
+
8
−
3
Options
@@ -381,9 +381,14 @@ class SogeCredit(models.Model):
tr
.
valid
=
True
tr
.
created_at
=
timezone
.
now
()
tr
.
save
()
self
.
credit_transaction
.
valid
=
False
self
.
credit_transaction
.
reason
+=
"
(invalide)
"
self
.
credit_transaction
.
save
()
if
self
.
credit_transaction
:
# If the soge credit is deleted while the user is not validated yet,
# there is not credit transaction.
# There is a credit transaction iff the user declares that no bank account
# was opened after the validation of the account.
self
.
credit_transaction
.
valid
=
False
self
.
credit_transaction
.
reason
+=
"
(invalide)
"
self
.
credit_transaction
.
save
()
super
().
delete
(
**
kwargs
)
class
Meta
:
Loading