From 645046149f151333fe8bc3d1cc7cea4ebf9e896b Mon Sep 17 00:00:00 2001 From: Bohung Date: Mon, 24 May 2021 17:44:52 +0800 Subject: [PATCH] Fix bug. --- app/models/album.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/album.rb b/app/models/album.rb index b945f09..cc2fc46 100644 --- a/app/models/album.rb +++ b/app/models/album.rb @@ -51,7 +51,7 @@ class Album Position object at bottom-right of region """ tmp = self[:resize_gravity] - (tmp.blank? ? AlbumSetting.first.resize_gravity : tmp) rescue 'Center' + (tmp.blank? ? (AlbumSetting.first.resize_gravity.blank? ? "Center" : AlbumSetting.first.resize_gravity) : tmp) rescue 'Center' end def self.find_by_param(input) self.find_by(uid: input)