Revize 1088c14e
Přidáno uživatelem Vojtěch Bartička před asi 3 roky(ů)
Backend/Core/Services/AnnotationService/AnnotationServiceEF.cs | ||
---|---|---|
45 | 45 |
{ |
46 | 46 |
if (userAnnotatedDocuments.Contains(docId)) |
47 | 47 |
{ |
48 |
logger.Information($"User {user.Username} has already been assigned the document {docId}"); |
|
49 |
throw new InvalidOperationException($"User {user.Username} has already been assigned the document {docId}"); |
|
48 |
logger.Information($"User {user.Username} has already been assigned the document {docId}, ignoring"); |
|
50 | 49 |
} |
51 | 50 |
|
52 | 51 |
var document = context.Documents.Single(d => d.Id == docId); |
Také k dispozici: Unified diff
Don't throw if user already assigned to document