mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
[Bug] unable to create the first user because role member was missing
This commit is contained in:
parent
0ace42bda9
commit
f1958a300b
@ -1,5 +1,6 @@
|
||||
# Changelog Fab Manager
|
||||
|
||||
- Fix a bug: unable to create the first user because role member was missing
|
||||
- Ability to configure and export the accounting data to the ACD accounting software
|
||||
- [TODO DEPLOY] `rake db:migrate`
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Members::MembersService
|
||||
@member.invoicing_profile.first_name = params[:profile_attributes][:first_name]
|
||||
@member.invoicing_profile.last_name = params[:profile_attributes][:last_name]
|
||||
@member.statistic_profile.group_id = params[:group_id]
|
||||
@member.statistic_profile.role_id = Role.find_by(name: 'member').id
|
||||
@member.statistic_profile.role_id = Role.find_or_create_by!(name: 'member').id
|
||||
|
||||
if @member.save
|
||||
@member.generate_subscription_invoice(current_user.id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user