mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Apply Lazyload on Model Update and Insert
This commit is contained in:
@@ -177,6 +177,7 @@ namespace NzbDrone.Core.Datastore
|
||||
var id = (int)multi.Read().First().id;
|
||||
_keyProperty.SetValue(model, id);
|
||||
|
||||
_database.ApplyLazyLoad(model);
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -213,6 +214,7 @@ namespace NzbDrone.Core.Datastore
|
||||
UpdateFields(conn, null, model, _properties);
|
||||
}
|
||||
|
||||
_database.ApplyLazyLoad(model);
|
||||
ModelUpdated(model);
|
||||
|
||||
return model;
|
||||
|
@@ -105,8 +105,8 @@ namespace NzbDrone.Core.ThingiProvider
|
||||
|
||||
public virtual void Update(TProviderDefinition definition)
|
||||
{
|
||||
_providerRepository.Update(definition);
|
||||
_eventAggregator.PublishEvent(new ProviderUpdatedEvent<TProvider>(definition));
|
||||
var updatedDef = _providerRepository.Update(definition);
|
||||
_eventAggregator.PublishEvent(new ProviderUpdatedEvent<TProvider>(updatedDef));
|
||||
}
|
||||
|
||||
public virtual void Update(IEnumerable<TProviderDefinition> definitions)
|
||||
|
Reference in New Issue
Block a user