[FIX] pms: wrong default value in property_id field of room model (#81)

This commit is contained in:
Eric Antones
2021-04-19 09:17:07 +02:00
committed by GitHub
parent 8d44c1265c
commit c19d6a76f6

View File

@@ -35,7 +35,7 @@ class PmsRoom(models.Model):
help="Properties with access to the element;"
" if not set, all properties can access",
required=True,
default=lambda self: self.env.user.active_property_ids[0],
default=lambda self: self.env.user.get_active_property_ids()[0],
comodel_name="pms.property",
ondelete="restrict",
)