Skip to content

Commit 4cf5c63

Browse files
committed
[B] Fix error in fetching Shrine model properties for upgrade task
1 parent e4e21e0 commit 4cf5c63

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

api/app/services/storage/shrine_properties.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ def shrine_columns_for(model)
2323

2424
def models
2525
tables.map do |table|
26-
table.classify.constantize
27-
rescue StandardError
28-
nil
29-
end.compact + plural_models
26+
table.classify.safe_constantize
27+
end.compact + plural_models - excluded_models
3028
end
3129

3230
def plural_models
3331
[Settings]
3432
end
3533

34+
def excluded_models
35+
[GoodJob]
36+
end
37+
3638
def tables
3739
ActiveRecord::Base.connection.tables - %w(schema_migrations comment_hierarchies comments) + %w(settings)
3840
end

api/db/structure.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\restrict 71IjF0CpVJbmpl2wkO8TeRrlRW0wJcOIZBAi86pXHPlNwLccXXCcqRdUV89aUYj
1+
\restrict icifZWZLPtT6Lj46Ay9keEYrjf2KGl0QqeEq4XbrArOKmRHf8Bo8itDhFf6QETT
22

33
-- Dumped from database version 13.22
44
-- Dumped by pg_dump version 13.22 (Debian 13.22-1.pgdg11+1)
@@ -7952,7 +7952,7 @@ ALTER TABLE ONLY public.reading_group_composite_entries
79527952
-- PostgreSQL database dump complete
79537953
--
79547954

7955-
\unrestrict 71IjF0CpVJbmpl2wkO8TeRrlRW0wJcOIZBAi86pXHPlNwLccXXCcqRdUV89aUYj
7955+
\unrestrict icifZWZLPtT6Lj46Ay9keEYrjf2KGl0QqeEq4XbrArOKmRHf8Bo8itDhFf6QETT
79567956

79577957
SET search_path TO "$user", public;
79587958

0 commit comments

Comments
 (0)