Warn only if project already exists
This commit is contained in:
parent
d9bc49c5d7
commit
b6aaf11ae2
@ -171,11 +171,26 @@ sub tag_project
|
||||
}
|
||||
}
|
||||
|
||||
log INFO, "Information de l'intranet...";
|
||||
# Call API
|
||||
log ERROR, $_ if(API::Projects::add($project_id, $year));
|
||||
eval {
|
||||
API::Projects::add($project_id, $year);
|
||||
};
|
||||
if ($@)
|
||||
{
|
||||
if ($@ =~ /apP]roject [aA]ll?ready [eE]xists/) {
|
||||
log WARN, $@;
|
||||
}
|
||||
else {
|
||||
log ERROR, $@;
|
||||
}
|
||||
}
|
||||
|
||||
# FIXME: Remove next line after 2016 piscine: ça ne devrait pas être fait à ce moment là
|
||||
log ERROR, $_ if(API::Projects::gen_groups($project_id, $year));
|
||||
eval {
|
||||
API::Projects::gen_groups($project_id, $year);
|
||||
};
|
||||
log ERROR, $_ if($@);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user