Merge pull request #366 from sbwalker/master

fix to not execute uninstall script when creating a module from template
This commit is contained in:
Shaun Walker 2020-04-13 08:01:03 -04:00 committed by GitHub
commit 0d153e9a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
}