Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
yams
Commits
da1c1368ea4f
Commit
5e609c96
authored
Nov 10, 2021
by
François Ferry
Browse files
fix: correct some bug introduce with typing
parent
18ae5afc7012
Pipeline
#93157
failed with stages
in 4 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
yams/schema.py
View file @
da1c1368
...
...
@@ -570,9 +570,7 @@ class EntitySchema(PermissionMixIn, ERSchema):
"""return metadata's relation schema if this entity has the given
`metadata` field for the given `attribute` attribute
"""
return
self
.
_subject_relations
.
get
(
self
.
schema
.
relation_schema_for
(
"%s_%s"
%
(
attribute
,
metadata
))
)
return
self
.
_subject_relations
.
get
(
"%s_%s"
%
(
attribute
,
metadata
))
@
deprecation
.
argument_renamed
(
old_name
=
"attr"
,
new_name
=
"attribute"
)
def
is_metadata
(
self
,
attribute
)
->
Optional
[
Tuple
[
str
,
str
]]:
...
...
@@ -1480,7 +1478,9 @@ class Schema:
]
=
[]
for
a_b
,
relation_definition
in
relation
.
relation_definitions
.
items
():
if
a_b
[
0
]
==
old_name
:
if
a_b
==
(
old_name
,
old_name
):
to_rename
.
append
((
a_b
,
(
new_name
,
new_name
),
relation_definition
))
elif
a_b
[
0
]
==
old_name
:
to_rename
.
append
((
a_b
,
(
new_name
,
a_b
[
1
]),
relation_definition
))
elif
a_b
[
1
]
==
old_name
:
to_rename
.
append
((
a_b
,
(
a_b
[
0
],
new_name
),
relation_definition
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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