minor cleanups
removed clutter from models.py (skill_ids only used for seeding) changed default value of update_profile handler (caused a crash during testing)
This commit is contained in:
parent
37f57eadea
commit
274f984994
@ -151,11 +151,11 @@ def update_profile(user_id: int):
|
|||||||
profile.freetext = request.json.get("freetext", "")
|
profile.freetext = request.json.get("freetext", "")
|
||||||
profile.visible = request.json.get("visible", False)
|
profile.visible = request.json.get("visible", False)
|
||||||
|
|
||||||
update_address(profile, request.json.get("address", {}))
|
update_address(profile, request.json.get("address"))
|
||||||
update_contacts(profile, request.json.get("contacts", {}))
|
update_contacts(profile, request.json.get("contacts", []))
|
||||||
update_skills(profile, request.json.get("skills", {}))
|
update_skills(profile, request.json.get("skills", []))
|
||||||
update_searchtopics(profile, request.json.get("searchtopics"))
|
update_searchtopics(profile, request.json.get("searchtopics", []))
|
||||||
update_languages(profile, request.json.get("languages", {}))
|
update_languages(profile, request.json.get("languages", []))
|
||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
@ -139,13 +139,6 @@ class Address(db.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Skill(db.Model):
|
class Skill(db.Model):
|
||||||
skill_id_php = 1
|
|
||||||
skill_id_python = 3
|
|
||||||
skill_id_sqlalchemy = 7
|
|
||||||
skill_id_mysql = 9
|
|
||||||
skill_id_postgresql = 10
|
|
||||||
skill_id_sqlite = 11
|
|
||||||
|
|
||||||
__tablename__ = "skill"
|
__tablename__ = "skill"
|
||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user