Skip to content

Commit

Permalink
Merge branch 'release-1.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomarrocoli committed Sep 14, 2023
2 parents 9c6487f + 006186a commit 5787a32
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.12.0
* Allow intersessional decisions to be created without start events or documents

### 1.11.0
* Adds accepted names to serializer to match documented end point
* Adds diactric insensitive seraching to geo_entity_search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
<a class="legal-links" href="https://speciesplus.net/api/v1/documents/{{unbound decision.intersessional_decision_id}}">
Intersessional decision
</a>
{{else}}
{{#unless decision.start_event.name }}
Intersessional decision
{{/unless}}
{{/if}}
{{#if decision.private_url}}
<a class="legal-links" href="{{unbound decision.private_url}}">
Expand Down Expand Up @@ -164,6 +168,10 @@
<a class="legal-links" href="https://speciesplus.net/api/v1/documents/{{unbound decision.intersessional_decision_id}}">
Intersessional decision
</a>
{{else}}
{{#unless decision.start_event.name }}
Intersessional decision
{{/unless}}
{{/if}}
{{#if decision.private_url}}
<a class="legal-links" href="{{unbound decision.private_url}}">
Expand Down
4 changes: 2 additions & 2 deletions app/models/eu_opinion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class EuOpinion < EuDecision
validate :event_or_document_presence

def event_or_document_presence
return if start_event_id.nil? ^ document_id.nil?
errors.add(:base, "Select at least an Event or a Document, but not both")
return unless start_event_id.present? && document_id.present?
errors.add(:base, "Select at an Event, a Document or neither, but not both")
end
end

0 comments on commit 5787a32

Please sign in to comment.