Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
pymemri
Commits
7fc388ff
Commit
7fc388ff
authored
2 years ago
by
Eelco van der Wel
Browse files
Options
Download
Plain Diff
Merge branch 'eelco/ignore-undefined-edges' into 'dev'
ignore undefined edges in get_item See merge request
!262
parents
850fe571
88e8a541
Pipeline
#11233
passed with stages
in 4 minutes and 27 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pymemri/data/schema/_central_schema.py
+7
-1
pymemri/data/schema/_central_schema.py
pymemri/pod/client.py
+4
-1
pymemri/pod/client.py
with
11 additions
and
2 deletions
+11
-2
pymemri/data/schema/_central_schema.py
+
7
-
1
View file @
7fc388ff
...
...
@@ -296,6 +296,8 @@ class MessageChannel(Item):
name
:
Optional
[
str
]
=
None
topic
:
Optional
[
str
]
=
None
service
:
Optional
[
str
]
=
None
isMock
:
Optional
[
bool
]
=
None
sourceProject
:
Optional
[
str
]
=
None
# Edges
photo
:
List
[
"Photo"
]
=
[]
...
...
@@ -409,6 +411,7 @@ class PluginRun(Item):
plugin
:
List
[
"Plugin"
]
=
[]
view
:
List
[
"CVUStoredDefinition"
]
=
[]
account
:
List
[
"Account"
]
=
[]
trigger
:
List
[
"Trigger"
]
=
[]
class
Post
(
Item
):
...
...
@@ -418,6 +421,7 @@ class Post(Item):
postDate
:
Optional
[
datetime
]
=
None
postType
:
Optional
[
str
]
=
None
isMock
:
Optional
[
bool
]
=
None
sourceProject
:
Optional
[
str
]
=
None
# Edges
author
:
List
[
"Account"
]
=
[]
...
...
@@ -457,7 +461,9 @@ class SuggestedMerge(Item):
class
TemplateSettings
(
Item
):
# Properties
name
:
Optional
[
str
]
=
None
templateName
:
Optional
[
str
]
=
None
templateId
:
Optional
[
int
]
=
None
dataSource
:
Optional
[
str
]
=
None
# Edges
labelOption
:
List
[
"LabelOption"
]
=
[]
...
...
This diff is collapsed.
Click to expand it.
pymemri/pod/client.py
+
4
-
1
View file @
7fc388ff
...
...
@@ -328,7 +328,10 @@ class PodClient:
item
=
self
.
_get_item_with_properties
(
id
)
edges
=
self
.
get_edges
(
id
)
for
e
in
edges
:
item
.
add_edge
(
e
[
"name"
],
e
[
"item"
])
if
e
[
"name"
]
in
item
.
edges
:
item
.
add_edge
(
e
[
"name"
],
e
[
"item"
])
else
:
logger
.
debug
(
f
"Could not add edge
{
e
[
'name'
]
}
: Edge is not defined on Item."
)
return
item
def
get_edges
(
self
,
id
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets