Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LinkAhead Loan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
LinkAhead Loan
Commits
5fd5e279
Commit
5fd5e279
authored
7 months ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Add TODOs
parent
bb57fabe
No related branches found
No related tags found
1 merge request
!1
Restructure and add integration tests
Pipeline
#54742
failed
7 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
loanpy/src/loan/conf.py
+1
-0
1 addition, 0 deletions
loanpy/src/loan/conf.py
loanpy/src/loan/confirm_loan.py
+3
-2
3 additions, 2 deletions
loanpy/src/loan/confirm_loan.py
loanpy/src/loan/manual_return.py
+4
-3
4 additions, 3 deletions
loanpy/src/loan/manual_return.py
with
8 additions
and
5 deletions
loanpy/src/loan/conf.py
+
1
−
0
View file @
5fd5e279
...
...
@@ -24,5 +24,6 @@ RETURNED = db.Property(name="returned", datatype=db.DATETIME)
BOX_NUMBER
=
db
.
Property
(
name
=
"
Number
"
,
datatype
=
db
.
TEXT
)
# Other Strings
# TODO: Adapt datamodel and remove name override
BOX_RETURNED
=
"
Box (returned)
"
BOX_BORROWED
=
"
Box (borrowed)
"
This diff is collapsed.
Click to expand it.
loanpy/src/loan/confirm_loan.py
+
3
−
2
View file @
5fd5e279
...
...
@@ -26,8 +26,8 @@ import caosdb as db
from
caosadvancedtools.serverside.helper
import
get_timestamp
,
print_success
from
.box_loan
import
(
BOX
,
BOX_BORROWED
,
DESTINATION
,
F_LOAN
,
LENT
,
S_LENT
,
S_LOAN_ACCEPTED
,
assert_loan_state
,
get_borrower_names
,
get_loan
,
main
,
set_location
,
set_property
)
S_LOAN_ACCEPTED
,
assert_loan_state
,
get_borrower_names
,
get_loan
,
main
,
set_location
,
set_property
)
def
_set_lent_box
(
loan
):
...
...
@@ -35,6 +35,7 @@ def _set_lent_box(loan):
This stores the version of the box when it was delivered to the borrower.
"""
# TODO: Adapt datamodel and remove name override
box_prop
=
loan
.
get_property
(
BOX
)
box_prop
.
name
=
BOX_BORROWED
box_prop
.
value
=
str
(
box_prop
.
value
)
+
"
@HEAD
"
...
...
This diff is collapsed.
Click to expand it.
loanpy/src/loan/manual_return.py
+
4
−
3
View file @
5fd5e279
...
...
@@ -26,9 +26,9 @@ import caosdb as db
from
caosadvancedtools.serverside.helper
import
get_timestamp
,
print_success
from
.box_loan
import
(
BOX
,
BOX_BORROWED
,
BOX_RETURNED
,
CONTENT
,
F_LOAN
,
RETURNED
,
RETURNLOCATION
,
S_RETURN_ACCEPTED
,
S_RETURNED
,
assert_loan_state
,
get_borrower_names
,
get_loan
,
main
,
set_location
,
set_property
)
RETURNED
,
RETURNLOCATION
,
S_RETURN_ACCEPTED
,
S_RETURNED
,
assert_loan_state
,
get_borrower_names
,
get_loan
,
main
,
set_location
,
set_property
)
def
_set_returned_box
(
loan
):
...
...
@@ -37,6 +37,7 @@ def _set_returned_box(loan):
This stores the version of the box that was returned by a borrower.
"""
box_id
=
loan
.
get_property
(
BOX_BORROWED
).
value
.
split
(
"
@
"
)[
0
]
# TODO: Adapt datamodel and remove name override
loan
.
add_property
(
property
=
BOX
,
name
=
BOX_RETURNED
,
value
=
box_id
+
"
@HEAD
"
)
...
...
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