group: "group_name"
This commit is contained in:
parent
bfec7b7a6d
commit
1f4cb5700e
@ -129,12 +129,8 @@ class GroupDescr(db.Model):
|
|||||||
|
|
||||||
def to_dict(self, with_partition=True) -> dict:
|
def to_dict(self, with_partition=True) -> dict:
|
||||||
"""as a dict, with or without partition"""
|
"""as a dict, with or without partition"""
|
||||||
d = {
|
d = dict(self.__dict__)
|
||||||
"id": self.id,
|
d.pop("_sa_instance_state", None)
|
||||||
"partition_id": self.partition_id,
|
|
||||||
"name": self.group_name,
|
|
||||||
"numero": self.numero,
|
|
||||||
}
|
|
||||||
if with_partition:
|
if with_partition:
|
||||||
d["partition"] = self.partition.to_dict(with_groups=False)
|
d["partition"] = self.partition.to_dict(with_groups=False)
|
||||||
return d
|
return d
|
||||||
|
Loading…
Reference in New Issue
Block a user