Compare commits

..

No commits in common. "980415bd209ecb5d9f06693105e91d48bed92c46" and "61bf24eab296d45293037a2c3c2b61727099f5d1" have entirely different histories.

8 changed files with 15 additions and 12 deletions

View File

@ -65,7 +65,6 @@ def seed(dev: bool):
peters_profile = Profile(nickname="peternichtlustig", peters_profile = Profile(nickname="peternichtlustig",
pronouns="Herr Dr. Dr.", pronouns="Herr Dr. Dr.",
volunteerwork="Gartenverein", volunteerwork="Gartenverein",
availability="Immer",
freetext="Ich mag Kaffee", freetext="Ich mag Kaffee",
user=peter) user=peter)
db.session.add(peters_profile) db.session.add(peters_profile)

View File

@ -110,7 +110,6 @@ def update_profile(user_id: int):
profile.pronouns = request.json.get("pronouns", "") profile.pronouns = request.json.get("pronouns", "")
profile.volunteerwork = request.json.get("volunteerwork", "") profile.volunteerwork = request.json.get("volunteerwork", "")
profile.availability = request.json.get("availability", "")
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)

View File

@ -32,7 +32,6 @@ class Profile(db.Model):
pronouns = Column(String(25), default="") pronouns = Column(String(25), default="")
volunteerwork = Column(String(4000), default="") volunteerwork = Column(String(4000), default="")
freetext = Column(String(4000), default="") freetext = Column(String(4000), default="")
availability = Column(String(4000), default="")
visible = Column(Boolean, nullable=False, default=False) visible = Column(Boolean, nullable=False, default=False)
created = Column(DateTime, nullable=False, default=datetime.now) created = Column(DateTime, nullable=False, default=datetime.now)
updated = Column(DateTime, onupdate=datetime.now, nullable=False, default=datetime.now) updated = Column(DateTime, onupdate=datetime.now, nullable=False, default=datetime.now)
@ -49,7 +48,6 @@ class Profile(db.Model):
"nickname": self.nickname, "nickname": self.nickname,
"pronouns": self.pronouns, "pronouns": self.pronouns,
"volunteerwork": self.volunteerwork, "volunteerwork": self.volunteerwork,
"availability": self.availability,
"freetext": self.freetext, "freetext": self.freetext,
"visible": self.visible, "visible": self.visible,
"address": self.address.to_dict(), "address": self.address.to_dict(),

View File

@ -33,7 +33,6 @@ class TestProfileEndpoint(ApiTest):
data = { data = {
"pronouns": "Monsieur", "pronouns": "Monsieur",
"volunteerwork": "ja", "volunteerwork": "ja",
"availability": "Nie",
"freetext": "Hallo", "freetext": "Hallo",
"visible": True, "visible": True,
"address": { "address": {
@ -97,7 +96,6 @@ class TestProfileEndpoint(ApiTest):
profile = user.profile profile = user.profile
self.assertEqual("Monsieur", profile.pronouns) self.assertEqual("Monsieur", profile.pronouns)
self.assertEqual("ja", profile.volunteerwork) self.assertEqual("ja", profile.volunteerwork)
self.assertEqual("Nie", profile.availability)
self.assertEqual("Hallo", profile.freetext) self.assertEqual("Hallo", profile.freetext)
self.assertTrue(profile.visible) self.assertTrue(profile.visible)
@ -167,7 +165,6 @@ class TestProfileEndpoint(ApiTest):
"user_id": 1, "user_id": 1,
"nickname": "peternichtlustig", "nickname": "peternichtlustig",
"pronouns": "Herr Dr. Dr.", "pronouns": "Herr Dr. Dr.",
"availability": "Immer",
"freetext": "Ich mag Kaffee", "freetext": "Ich mag Kaffee",
"volunteerwork": "Gartenverein", "volunteerwork": "Gartenverein",
"visible": False, "visible": False,

View File

@ -1 +0,0 @@
Generic single-database configuration.

View File

@ -1,3 +1,7 @@
; SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
;
; SPDX-License-Identifier: AGPL-3.0-or-later
# A generic, single database configuration. # A generic, single database configuration.
[alembic] [alembic]

View File

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from __future__ import with_statement from __future__ import with_statement
import logging import logging

View File

@ -1,8 +1,12 @@
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Initial migration. """Initial migration.
Revision ID: 808fe55111df Revision ID: ebb2dd1fb371
Revises: Revises:
Create Date: 2021-07-05 20:13:50.560579 Create Date: 2021-07-02 16:20:18.160228
""" """
from alembic import op from alembic import op
@ -10,7 +14,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = '808fe55111df' revision = 'ebb2dd1fb371'
down_revision = None down_revision = None
branch_labels = None branch_labels = None
depends_on = None depends_on = None
@ -34,7 +38,6 @@ def upgrade():
sa.Column('pronouns', sa.String(length=25), nullable=True), sa.Column('pronouns', sa.String(length=25), nullable=True),
sa.Column('volunteerwork', sa.String(length=4000), nullable=True), sa.Column('volunteerwork', sa.String(length=4000), nullable=True),
sa.Column('freetext', sa.String(length=4000), nullable=True), sa.Column('freetext', sa.String(length=4000), nullable=True),
sa.Column('availability', sa.String(length=4000), nullable=True),
sa.Column('visible', sa.Boolean(), nullable=False), sa.Column('visible', sa.Boolean(), nullable=False),
sa.Column('created', sa.DateTime(), nullable=False), sa.Column('created', sa.DateTime(), nullable=False),
sa.Column('updated', sa.DateTime(), nullable=False), sa.Column('updated', sa.DateTime(), nullable=False),