Create default room categories on establishment registration
Closing #9
This commit is contained in:
parent
30a91d1ce7
commit
5cfdb9400b
1 changed files with 6 additions and 1 deletions
|
@ -130,7 +130,12 @@ class EstablishmentRequestView(InConstructionMixin, PartnerProfileRequiredMixin,
|
|||
|
||||
def form_valid(self, form):
|
||||
form.instance.owner = self.request.user.partnerprofile
|
||||
return super().form_valid(form)
|
||||
retval = super().form_valid(form)
|
||||
|
||||
RoomCategory.objects.create(name="Einzelzimmer", average_price=100, active=False, establishment=form.instance) # TODO: Move somewhere better
|
||||
RoomCategory.objects.create(name="Doppelzimmer", average_price=100, active=False, establishment=form.instance)
|
||||
|
||||
return retval
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse_lazy("partners:establishments")
|
||||
|
|
Loading…
Reference in a new issue