feat(trophies): added programs count
This commit is contained in:
parent
107c891553
commit
a7bde62ff2
|
@ -112,6 +112,7 @@ class Member(User):
|
|||
trophies = db.relationship('Trophy', secondary=TrophyMember,
|
||||
back_populates='owners')
|
||||
topics = db.relationship('Topic')
|
||||
programs = db.relationship('Program')
|
||||
comments = db.relationship('Comment')
|
||||
|
||||
# Displayed title
|
||||
|
@ -373,8 +374,7 @@ class Member(User):
|
|||
progress(levels, post_count)
|
||||
|
||||
if context in ["new-program", None]:
|
||||
# TODO: Amount of programs by the user
|
||||
program_count = 0
|
||||
program_count = self.programs.count()
|
||||
|
||||
levels = {
|
||||
5: "Programmeur du dimanche",
|
||||
|
|
Loading…
Reference in New Issue