changeset 61:389e5d8e5f8a default tip

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 06 Dec 2022 13:37:25 -0700
parents 8b5b1bce7d6b
children
files src/lib/User.luan
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/User.luan	Wed Nov 30 23:50:52 2022 -0700
+++ b/src/lib/User.luan	Tue Dec 06 13:37:25 2022 -0700
@@ -104,7 +104,7 @@
 		if user ~= nil then return user end
 	end
 	local doc = Db.get_document("id:"..id)
-	return doc and from_doc(doc)
+	return doc and doc.type=="user" and from_doc(doc) or nil
 end
 User.get_by_id = get_by_id