You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code sets the args to null on line 113 but then tries to access a property on that reference.
publicobjectSave(objectentity,boolfireEvents=true){// I AM NULLSavingEntityEventArgsargs=null;if(fireEvents){varexisting=Get(entity.GetPropertyValue(_collection.IdProperty));// I AM ONLY SET HEREargs=newSavingEntityEventArgs{Entity=newBeforeAndAfter<object>{Before=existing,After=entity}};Fluidity.OnSavingEntity(args);if(args.Cancel)returnargs.Entity.After;entity=args.Entity.After;}// I AM NULL HERE!Db.Save(args.Entity.After);if(fireEvents){Fluidity.OnSavedEntity(args);entity=args.Entity.After;}returnentity;}
The text was updated successfully, but these errors were encountered:
Good spot. I should be calling save on the entity variable not the one in the event args. I've pushed a fix and should be available in the nightly shortly.
using
.Save(object, false)
against the current master branch.https://github.com/umco/umbraco-fluidity/blob/04feb1d4b83ccc33bb2d03e7a3d29dd01b731d65/src/Fluidity/Data/DefaultFluidityRepository.cs#L135
The code sets the args to null on line 113 but then tries to access a property on that reference.
The text was updated successfully, but these errors were encountered: