Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
47486438
Commit
47486438
authored
Dec 15, 2020
by
Matthieu Muffato
Committed by
ens-bwalts
Aug 04, 2021
Browse files
[
ENSCORESW-3002
] Forbid setting a resource-class that doesn't exist
parent
231d685a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
modules/Bio/EnsEMBL/Hive/HivePipeline.pm
modules/Bio/EnsEMBL/Hive/HivePipeline.pm
+4
-7
No files found.
modules/Bio/EnsEMBL/Hive/HivePipeline.pm
View file @
47486438
...
...
@@ -814,15 +814,12 @@ sub apply_tweaks {
my
$resource_class
;
if
(
$resource_class
=
$self
->
collection_of
(
'
ResourceClass
'
)
->
find_one_by
(
'
name
',
$new_value
))
{
push
@response
,
"
Tweak.Found
\t
resource_class[
$new_value_str
]
\n
";
$analysis
->
resource_class
(
$resource_class
);
$need_write
=
1
;
}
else
{
push
@response
,
"
Tweak.Adding
\t
resource_class[
$new_value_str
]
\n
";
(
$resource_class
)
=
$self
->
add_new_or_update
(
'
ResourceClass
',
# NB: add_new_or_update returns a list
'
name
'
=>
$new_value
,
);
$tweakStructure
->
{
Error
}
=
TWEAK_ERROR_MSG
->
{
VALUE_ERROR
};
push
@response
,
"
Tweak.Error
\t
'
$new_value_str
' is not a known resource-class
\n
";
}
$analysis
->
resource_class
(
$resource_class
);
$need_write
=
1
;
}
}
elsif
(
$attrib_name
eq
'
is_excluded
'
)
{
...
...
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