Skip to content

Commit

Permalink
Merge pull request #1089 from sbwalker/dev
Browse files Browse the repository at this point in the history
module creator owner and module name cannot be the same
  • Loading branch information
sbwalker authored Feb 4, 2021
2 parents 077c40e + 988639b commit 170289c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ else
{
try
{
if (IsValid(_owner) && IsValid(_module) && _template != "-")
if (IsValid(_owner) && IsValid(_module) && _owner != _module && _template != "-")
{
var moduleDefinition = new ModuleDefinition { Owner = _owner, Name = _module, Description = _description, Template = _template, Version = _reference };
moduleDefinition = await ModuleDefinitionService.CreateModuleDefinitionAsync(moduleDefinition);
Expand All @@ -126,7 +126,7 @@ else
}
else
{
AddModuleMessage(Localizer["You Must Provide A Valid Owner Name, Module Name, And Template"], MessageType.Warning);
AddModuleMessage(Localizer["You Must Provide A Valid Owner Name And Module Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same ) And Choose A Template"], MessageType.Warning);
}
}
catch (Exception ex)
Expand Down

0 comments on commit 170289c

Please sign in to comment.