Skip to content
Snippets Groups Projects
Commit 1baeff96 authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Fix: Prevent deletion of list of reporting variables

parent b2afab61
No related branches found
No related tags found
No related merge requests found
Pipeline #900768 passed
......@@ -109,7 +109,8 @@ public abstract class Reporting<O> where O : class
// Delete files or organizations that are not valid anymore
foreach (var fileInProject in projectTree.Where(file => file.Type.Equals("blob")))
{
if (!files.Any(f => f.Path.Equals(fileInProject.Path)) && !fileInProject.Path.Equals("README.md"))
// Ignore the files named "List of Reporting Variables.xlsx" and "README.md"
if (!files.Any(f => f.Path.Equals(fileInProject.Path)) && (!fileInProject.Path.Equals("README.md") || !fileInProject.Path.Equals("List of Reporting Variables.xlsx")))
{
// Add Action
actions.Add(new CreateCommitRequestAction(CreateCommitRequestActionType.Delete, fileInProject.Path));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment