1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-18 20:59:43 +02:00

Handle non-pinned spaces

This commit is contained in:
sauls8t 2020-02-04 14:36:40 +00:00
parent fbd4b17c15
commit bda9719ecb

View file

@ -367,7 +367,7 @@ func (s Store) PinSequence(ctx domain.RequestContext, spaceID string) (max int,
max = 0
err = s.Runtime.Db.Get(&max, s.Bind(`
SELECT MAX(c_seq)
SELECT COALESCE(MAX(c_seq), 0)
FROM dmz_doc
WHERE c_orgid=? AND c_spaceid=?
AND c_seq != 99999`),