Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
b2e0cab9
Commit
b2e0cab9
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
b9628932
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
modules/Bio/EnsEMBL/Hive/HivePipeline.pm
modules/Bio/EnsEMBL/Hive/HivePipeline.pm
+3
-6
No files found.
modules/Bio/EnsEMBL/Hive/HivePipeline.pm
View file @
b2e0cab9
...
...
@@ -747,15 +747,12 @@ sub apply_tweaks {
my
$resource_class
;
if
(
$resource_class
=
$self
->
collection_of
(
'
ResourceClass
'
)
->
find_one_by
(
'
name
',
$new_value
))
{
print
"
Tweak.Found
\t
resource_class[
$new_value_str
]
\n
";
$analysis
->
resource_class
(
$resource_class
);
$need_write
=
1
;
}
else
{
print
"
Tweak.
Adding
\t
resource_class[
$new_value_str
]
\n
";
print
"
Tweak.
Error
\t
'
$new_value_str
' is not a known resource-class
\n
";
(
$resource_class
)
=
$self
->
add_new_or_update
(
'
ResourceClass
',
# NB: add_new_or_update returns a list
'
name
'
=>
$new_value
,
);
}
$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