Archived
1
0

Warn only if project already exists

This commit is contained in:
Mercier Pierre-Olivier 2013-09-14 18:43:46 +02:00
parent d9bc49c5d7
commit b6aaf11ae2

View File

@ -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
{