minor cleanups
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

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:
jaschop 2023-10-20 12:27:41 +02:00
parent 37f57eadea
commit 274f984994
Signed by: jaschop
GPG Key ID: E503D2974583A92E
2 changed files with 5 additions and 12 deletions

View File

@ -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()

View File

@ -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)