Skip to content

Commit

Permalink
FIX: Add a new item to combobox failed when there were non null fields (
Browse files Browse the repository at this point in the history
#2202)

* Adding a new item to combobox failed if the underlying field required a non null value
* Properties hidden were made visible by mistake
  • Loading branch information
JindrichSusen committed Nov 20, 2023
1 parent beef531 commit affbb41
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class NewRecordScreenBinding : AbstractSchemaItem, IAuthorizationContextC
public NewRecordScreenBinding(Guid schemaExtensionId) : base(schemaExtensionId) { }

public NewRecordScreenBinding(Key primaryKey) : base(primaryKey) {}


[Browsable(false)]
public bool IsAvailable
{
get
Expand Down
1 change: 1 addition & 0 deletions backend/Origam.Schema/AbstractSchemaItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ private AbstractSchemaItem GetRootItem(AbstractSchemaItem parentItem)
return GetRootItem(parentItem.ParentItem);
}

[Browsable(false)]
public IEnumerable<AbstractSchemaItem> Parents
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public override void Init()
row, true, SecurityManager.CurrentUserProfile().Id);
row.Table.NewRow();

RemoveNullConstraints(dataSet);
dataSet.Tables[rootEntity.Name].Rows.Add(row);
SetDataSource(dataSet);
}
Expand Down
2 changes: 1 addition & 1 deletion backend/Origam.Server/Session Stores/SessionStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ public virtual void OnDispose()
#endregion

#region Private Methods
private static void RemoveNullConstraints(DataSet dataset)
protected static void RemoveNullConstraints(DataSet dataset)
{
foreach (DataTable table in dataset.Tables)
{
Expand Down

0 comments on commit affbb41

Please sign in to comment.