Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update challenge with card image #70

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Following Semantic Versioning 2.

## next version:

## Version 0.3.3 (PATCH)
- Fix update challenge with a card image

## Version 0.3.2 (PATCH)
- Fix card image validation in Challenges Form.

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ GIT
PATH
remote: .
specs:
decidim-challenges (0.3.2)
decidim-challenges (0.3.3)
decidim-core (~> 0.27)

GEM
Expand Down
7 changes: 5 additions & 2 deletions app/commands/decidim/challenges/admin/update_challenge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module Challenges
module Admin
# A command with all the business logic when a user updates a challenge.
class UpdateChallenge < Decidim::Command
include ::Decidim::AttachmentAttributesMethods

# Public: Initializes the command.
#
# form - A form object with the params.
Expand Down Expand Up @@ -60,8 +62,9 @@ def attributes
end_date: form.end_date,
coordinating_entities: form.coordinating_entities,
collaborating_entities: form.collaborating_entities,
card_image: form.card_image,
}
}.merge(
attachment_attributes(:card_image)
)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/decidim/challenges/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Decidim
# This holds the decidim-meetings version.
module Challenges
def self.version
"0.3.2"
"0.3.3"
end

def self.decidim_version
Expand Down
Loading