Skip to content

Commit

Permalink
Fix update challenge with card image (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurajaime committed Apr 22, 2024
1 parent 84f038a commit 2f3f8c9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
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

0 comments on commit 2f3f8c9

Please sign in to comment.