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
beat
beat.editor
Commits
1299c119
Commit
1299c119
authored
Jun 16, 2020
by
Samuel GAIST
Browse files
[backend][resourcemodels] Fix is_valid use
parent
8e522bcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/backend/resourcemodels.py
View file @
1299c119
...
...
@@ -24,6 +24,7 @@
###############################################################################
import
logging
import
simplejson
as
json
from
PyQt5.QtSql
import
QSqlDatabase
...
...
@@ -112,7 +113,9 @@ class ExperimentResources:
for
algorithm
in
model
.
stringList
():
asset
=
Asset
(
prefix_path
,
AssetType
.
ALGORITHM
,
algorithm
)
if
not
asset
.
is_valid
:
is_valid
,
_
=
asset
.
is_valid
()
if
not
is_valid
:
logger
.
debug
(
"Skipping invalid algorithm {}"
.
format
(
algorithm
))
continue
declaration
=
asset
.
declaration
...
...
@@ -313,10 +316,10 @@ class DatasetResourceModel(QSqlTableModel):
self
.
select
()
def
update
(
self
):
filter_str
=
f
""
filter_str
=
""
if
self
.
_output_count
is
not
None
:
filter_str
+
=
f
"outputs=
{
self
.
_output_count
}
"
filter_str
=
f
"outputs=
{
self
.
_output_count
}
"
self
.
setFilter
(
filter_str
)
...
...
Write
Preview
Markdown
is supported
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