5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-02-24 13:41:47 +00:00

Merge branch 'issue-15066' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl

This commit is contained in:
Sutty 2024-04-23 17:12:56 +00:00
commit e37fe084f9
3 changed files with 5 additions and 2 deletions

View file

@ -49,6 +49,8 @@ class MetadataFile < MetadataTemplate
value['path'] = relative_destination_path_with_filename.to_s if static_file
end
self[:value] = self[:value].to_h
true
end

View file

@ -193,7 +193,7 @@ class Post
# Limpiar el nombre del atributo, para que todos los ayudantes
# reciban el método en limpio
unless attribute? name
raise UnknownAttributeError, I18n.t('exceptions.post.no_method', method: name)
raise NoMethodError, I18n.t('exceptions.post.no_method', method: name)
end
define_singleton_method(name) do

View file

@ -19,9 +19,10 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do
# Crea los posts anidados
create_nested_posts! post, params[:post]
post.save
update_related_posts
commit(action: :created, add: files) if post.save
commit(action: :created, add: files)
update_site_license!