Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
caosdb-server
Commits
a29e1609
Verified
Commit
a29e1609
authored
1 year ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
TST: fix tests
parent
b39d25ac
No related branches found
No related tags found
No related merge requests found
Pipeline
#48910
failed
1 year ago
Stage: info
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripting/bin/administration/diagnostics.py
+5
-5
5 additions, 5 deletions
scripting/bin/administration/diagnostics.py
src/main/java/org/caosdb/server/resource/transaction/DeleteEntityResource.java
+6
-7
6 additions, 7 deletions
...sdb/server/resource/transaction/DeleteEntityResource.java
with
11 additions
and
12 deletions
scripting/bin/administration/diagnostics.py
+
5
−
5
View file @
a29e1609
...
...
@@ -34,7 +34,7 @@ should not be executable for non-admin users.
import
sys
TEST_MODULES
=
[
"
caosdb
"
,
"
linkahead
"
,
"
numpy
"
,
"
pandas
"
,
"
validate_email
"
...
...
@@ -73,8 +73,8 @@ def get_query():
return
get_option
(
"
query
"
)
def
get_
caosdb
_info
(
auth_token
):
import
caosdb
as
db
def
get_
linkahead
_info
(
auth_token
):
import
linkahead
as
db
result
=
dict
()
result
[
"
version
"
]
=
db
.
version
.
version
...
...
@@ -136,8 +136,8 @@ def main():
auth_token
=
get_auth_token
()
diagnostics
[
"
auth_token
"
]
=
auth_token
if
diagnostics
[
"
import
"
][
"
caosdb
"
][
0
]
is
True
:
diagnostics
[
"
caosdb
"
]
=
get_caosdb
_info
(
auth_token
)
if
diagnostics
[
"
import
"
][
"
linkahead
"
][
0
]
is
True
:
diagnostics
[
"
linkahead
"
]
=
get_linkahead
_info
(
auth_token
)
finally
:
json
.
dump
(
diagnostics
,
sys
.
stdout
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/caosdb/server/resource/transaction/DeleteEntityResource.java
+
6
−
7
View file @
a29e1609
...
...
@@ -3,7 +3,6 @@ package org.caosdb.server.resource.transaction;
import
java.util.List
;
import
org.caosdb.server.entity.DeleteEntity
;
import
org.caosdb.server.entity.EntityID
;
import
org.caosdb.server.entity.UpdateEntity
;
import
org.caosdb.server.entity.container.WritableContainer
;
import
org.caosdb.server.transaction.WriteTransaction
;
import
org.caosdb.server.transaction.WriteTransactionInterface
;
...
...
@@ -33,15 +32,15 @@ public class DeleteEntityResource extends EntityResource {
new
WritableContainer
(
getUser
(),
getTimestamp
(),
getSRID
(),
getFlags
());
final
Document
doc
=
new
Document
();
List
<
Element
>
upda
teEntities
;
upda
teEntities
=
parseEntity
(
getRequest
().
getEntity
()).
getRootElement
().
getChildren
();
List
<
Element
>
dele
teEntities
;
dele
teEntities
=
parseEntity
(
getRequest
().
getEntity
()).
getRootElement
().
getChildren
();
for
(
final
Element
e
:
upda
teEntities
)
{
entityContainer
.
add
(
new
DeleteEntity
(
new
EntityID
(
new
UpdateEntity
(
e
).
getId
().
toString
(
))));
for
(
final
Element
e
:
dele
teEntities
)
{
entityContainer
.
add
(
new
DeleteEntity
(
new
EntityID
(
e
.
getAttributeValue
(
"id"
))));
}
final
WriteTransactionInterface
update
=
new
WriteTransaction
(
entityContainer
);
update
.
execute
();
final
WriteTransactionInterface
transaction
=
new
WriteTransaction
(
entityContainer
);
transaction
.
execute
();
final
Element
rootElem
=
generateRootElement
();
entityContainer
.
addToElement
(
rootElem
);
...
...
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