mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
fix: don't save revisions on creation
sometimes we create revisions for notes that don't exist yet. If we try to persist a revision that is referring to a non-existing note the whole attempt crashes. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
bb355feddc
commit
c25c0fac92
1 changed files with 1 additions and 2 deletions
|
@ -175,7 +175,7 @@ export class RevisionsService {
|
|||
return entity;
|
||||
});
|
||||
|
||||
const revision = Revision.create(
|
||||
return Revision.create(
|
||||
newContent,
|
||||
patch,
|
||||
note,
|
||||
|
@ -184,6 +184,5 @@ export class RevisionsService {
|
|||
description,
|
||||
tagEntities,
|
||||
) as Revision;
|
||||
return await this.revisionRepository.save(revision);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue