Revert "[Avatar] Fix, sodass korrekte url rausgegeben wird."
This reverts commit 1b1dd8d7a7
.
This commit is contained in:
parent
1b1dd8d7a7
commit
4534d0ff15
|
@ -1,7 +1,7 @@
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from flask import url_for, request
|
from flask import url_for
|
||||||
from sqlalchemy.orm.collections import attribute_mapped_collection
|
from sqlalchemy.orm.collections import attribute_mapped_collection
|
||||||
|
|
||||||
from . import ModelSerializeMixin
|
from . import ModelSerializeMixin
|
||||||
|
@ -68,7 +68,7 @@ class User(db.Model, ModelSerializeMixin):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def avatar_url(self):
|
def avatar_url(self):
|
||||||
return f'{request.url_root}/{url_for("users.get_avatar", userid=self.userid)}'
|
return url_for("users.get_avatar", userid=self.userid)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def roles(self):
|
def roles(self):
|
||||||
|
|
Loading…
Reference in New Issue