fix to not execute uninstall script when creating a module from template

This commit is contained in:
Shaun Walker 2020-04-13 08:01:25 -04:00
parent 1ed8f4554a
commit c25615546a

View File

@ -244,9 +244,9 @@ namespace Oqtane.Controllers
text = text.Replace("[File]", Path.GetFileName(filePath));
System.IO.File.WriteAllText(filePath, text);
if (Path.GetExtension(filePath) == ".sql")
if (Path.GetExtension(filePath).ToLower() == ".sql" && !filePath.ToLower().Contains("uninstall"))
{
// execute script in curent tenant
// execute installation script in curent tenant
_sql.ExecuteScript(_resolver.GetTenant(), text);
}
}