Skip to content

Commit

Permalink
fixed error on engineering models updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joao4all committed Jul 24, 2024
1 parent 05ed811 commit c462b51
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ public async Task CreateOrEditEngineeringModel(bool shouldCreate)

var siteDirectoryClone = this.SessionService.GetSiteDirectory().Clone(false);
var thingsToCreate = new List<Thing>();
this.CurrentThing.EngineeringModelIid = Guid.NewGuid();

if (shouldCreate)
{
this.CurrentThing.EngineeringModelIid = Guid.NewGuid();
siteDirectoryClone.Model.Add(this.CurrentThing);
thingsToCreate.Add(siteDirectoryClone);

Expand Down Expand Up @@ -248,6 +248,11 @@ protected override Task OnThingChanged()
/// <param name="siteRdl">The updated <see cref="SiteReferenceDataLibrary"/></param>
private void OnSelectedSiteRdlChanged(SiteReferenceDataLibrary siteRdl)
{
if (this.CurrentThing.Iid != Guid.Empty)
{
return;
}

this.CurrentThing.RequiredRdl.Clear();

if (siteRdl != null)
Expand Down

0 comments on commit c462b51

Please sign in to comment.