Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "missingMapsProfile" & "osmProfile" User DTO fields #4794

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions backend/models/dtos/user_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ class UserDTO(Model):
teams_notifications = BooleanType(serialized_name="teamsNotifications")

# these are read only
missing_maps_profile = StringType(serialized_name="missingMapsProfile")
osm_profile = StringType(serialized_name="osmProfile")
gender = StringType(
serialized_name="gender",
choices=("MALE", "FEMALE", "SELF_DESCRIBE", "PREFER_NOT"),
Expand Down
10 changes: 0 additions & 10 deletions backend/models/postgis/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ class User(db.Model):
accepted_licenses = db.relationship("License", secondary=user_licenses_table)
interests = db.relationship(Interest, secondary=user_interests, backref="users")

@property
def missing_maps_profile_url(self):
return f"http://www.missingmaps.org/users/#/{self.username}"

@property
def osm_profile_url(self):
return f"{current_app.config['OSM_SERVER_URL']}/user/{self.username}"

def create(self):
""" Creates and saves the current model to the DB """
db.session.add(self)
Expand Down Expand Up @@ -364,8 +356,6 @@ def as_dto(self, logged_in_username: str) -> UserDTO:
user_dto.country = self.country
user_dto.name = self.name
user_dto.picture_url = self.picture_url
user_dto.osm_profile = self.osm_profile_url
user_dto.missing_maps_profile = self.missing_maps_profile_url
user_dto.default_editor = self.default_editor
user_dto.mentions_notifications = self.mentions_notifications
user_dto.projects_notifications = self.projects_notifications
Expand Down