Small bugfixes

This commit is contained in:
Tulir Asokan
2018-02-22 17:20:37 +02:00
parent 25252c7b79
commit aded9d9210
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1053,8 +1053,8 @@ class Portal:
def new_db_instance(self):
return DBPortal(tgid=self.tgid, tg_receiver=self.tg_receiver, peer_type=self.peer_type,
mxid=self.mxid, username=self.username, title=self.title,
about=self.about, photo_id=self.photo_id)
mxid=self.mxid, username=self.username, title=self.title, about=self.about,
photo_id=self.photo_id)
def migrate_and_save(self, new_id):
existing = DBPortal.query.get(self.tgid_full)
+1 -1
View File
@@ -154,7 +154,7 @@ class PublicBridgeWebsite:
return await self.post_login_phone(user, data["phone"])
elif "code" in data:
resp = await self.post_login_code(user, data["code"], password_in_data="password" in data)
if resp:
if resp or "password" not in data:
return resp
elif "password" not in data:
return self.render_login(error="No data given.", status=400)