Skip to content

Commit a18f632

Browse files
author
github-actions
committed
fix: ravendb update fail with serialization issue
1 parent 1fbaf23 commit a18f632

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Aguacongas.AspNetCore.Authentication.RavenDb/DynamicProviderStore.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,17 @@ public virtual async Task UpdateAsync(TSchemeDefinition definition, Cancellation
130130

131131
data.SerializedOptions = serialized.SerializedOptions;
132132
data.SerializedHandlerType = serialized.SerializedHandlerType;
133+
var handlerType = definition.HandlerType;
134+
var options = definition.Options;
135+
136+
data.HandlerType = null;
137+
data.Options = null;
133138

134-
await _session.StoreAsync(data).ConfigureAwait(false);
135139
await _session.SaveChangesAsync(cancellationToken).ConfigureAwait(false);
136140

141+
definition.HandlerType = handlerType;
142+
definition.Options = options;
143+
137144
_logger.LogInformation("Scheme {scheme} updated for {handlerType} with options: {options}", definition.Scheme, definition.HandlerType, data.SerializedOptions);
138145
}
139146

0 commit comments

Comments
 (0)