diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-01-22 20:20:15 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-01-22 20:20:15 +0300 |
commit | 15cd7adbbd2170407125c83bfe05332df98a917d (patch) | |
tree | d04ee744506c9b4d36a90a482abda8c0e80a26b1 /lib | |
parent | c332a6725048d9158384fe3f6605ddfac67b3a4f (diff) |
Remove template id after first save
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/WopiController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index cca4607d..daf4e7d6 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -467,7 +467,10 @@ class WopiController extends Controller { return new JSONResponse([ 'Name' => $file->getName(), 'Url' => $url ], Http::STATUS_OK); } - + if ($wopi->hasTemplateId()) { + $wopi->setTemplateId(null); + $this->wopiMapper->update($wopi); + } return new JSONResponse(['LastModifiedTime' => Helper::toISO8601($file->getMTime())]); } catch (\Exception $e) { $this->logger->logException($e, ['level' => ILogger::ERROR, 'app' => 'richdocuments', 'message' => 'getFile failed']); |