mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Don't update user if it doesn't exist
This commit is contained in:
parent
ce85e08ed8
commit
98506a3a4f
3 changed files with 10 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
0.13.3
|
||||
0.13.4
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [0.13.4] — 2024-09-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed a bug preventing the application from starting, when there is no users in the database but a data migration tries to update one.
|
||||
|
||||
|
||||
## [0.13.3] — 2024-09-06
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
class MakeFirstUserAdmin < ActiveRecord::Migration[7.1]
|
||||
def up
|
||||
user = User.first
|
||||
user.update!(admin: true)
|
||||
user&.update!(admin: true)
|
||||
end
|
||||
|
||||
def down
|
||||
user = User.first
|
||||
user.update!(admin: false)
|
||||
user&.update!(admin: false)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue