Skip to content

Commit cc45e15

Browse files
author
Bart Koelman
committed
Workaround for crash in cibuild
1 parent a1dcf87 commit cc45e15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/JsonApiDotNetCore/Serialization/Request/Adapters/AtomicOperationObjectAdapter.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ private WriteOperationKind ConvertOperationCode(AtomicOperationObject atomicOper
6969
{
7070
case AtomicOperationCode.Add:
7171
{
72-
if (atomicOperationObject.Ref is { Relationship: null })
72+
// ReSharper disable once MergeIntoPattern
73+
// Justification: Merging this into a pattern crashes the command-line versions of CleanupCode/InspectCode.
74+
// Tracked at: https://youtrack.jetbrains.com/issue/RSRP-486717
75+
if (atomicOperationObject.Ref != null && atomicOperationObject.Ref.Relationship == null)
7376
{
7477
using IDisposable _ = state.Position.PushElement("ref");
7578
throw new ModelConversionException(state.Position, "The 'relationship' element is required.", null);

0 commit comments

Comments
 (0)