Skip to content

Commit

Permalink
Merge pull request #3 from oqtane/master
Browse files Browse the repository at this point in the history
Sync master
  • Loading branch information
jimspillane authored May 1, 2020
2 parents e627e14 + 922c779 commit c30ee60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Oqtane.Client/Themes/Controls/ModuleActionsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ protected virtual List<ActionViewModel> GetActions()
private async Task<string> EditUrlAsync(string url, int moduleId, string import)
{
await Task.Yield();
EditUrl(moduleId, import);
return url;
return EditUrl(moduleId, import);
}

protected async Task ModuleAction(ActionViewModel action)
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Server/Infrastructure/DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private Installation MigrateModules(InstallConfig install)
}
}
}
if (moduledefinition.Version != versions[versions.Length - 1])
if (string.IsNullOrEmpty(result.Message) && moduledefinition.Version != versions[versions.Length - 1])
{
moduledefinition.Version = versions[versions.Length - 1];
db.Entry(moduledefinition).State = EntityState.Modified;
Expand Down
9 changes: 8 additions & 1 deletion Oqtane.Server/Repository/ModuleDefinitionRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ private List<ModuleDefinition> LoadSiteModuleDefinitions(int siteId)
}
else
{
moduledefinition.Permissions = permissions.Where(item => item.EntityId == moduledef.ModuleDefinitionId).EncodePermissions();
if (permissions.Where(item => item.EntityId == moduledef.ModuleDefinitionId).Any())
{
moduledefinition.Permissions = permissions.Where(item => item.EntityId == moduledef.ModuleDefinitionId).EncodePermissions();
}
else
{
_permissions.UpdatePermissions(siteId, EntityNames.ModuleDefinition, moduledef.ModuleDefinitionId, moduledefinition.Permissions);
}
}
}
// remove module definition from list as it is already synced
Expand Down

0 comments on commit c30ee60

Please sign in to comment.