[backend/core] Whitespace-only content warning should be reset to null
This commit is contained in:
parent
930f4d2aaa
commit
7c1de50768
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,9 @@ public class NoteService(
|
||||||
if (attachments != null && attachments.Any(p => p.UserId != user.Id))
|
if (attachments != null && attachments.Any(p => p.UserId != user.Id))
|
||||||
throw GracefulException.BadRequest("Refusing to create note with files belonging to someone else");
|
throw GracefulException.BadRequest("Refusing to create note with files belonging to someone else");
|
||||||
|
|
||||||
|
if (cw != null && string.IsNullOrWhiteSpace(cw))
|
||||||
|
cw = null;
|
||||||
|
|
||||||
var note = new Note
|
var note = new Note
|
||||||
{
|
{
|
||||||
Id = IdHelpers.GenerateSlowflakeId(),
|
Id = IdHelpers.GenerateSlowflakeId(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue