mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-25 01:12:30 +00:00
Merge branch 'fix-datetime-comparison' into 'master'
Fix DateTime comparison See merge request framasoft/mobilizon!423
This commit is contained in:
commit
e2da3ac13c
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ defmodule Mobilizon.Events.Event do
|
|||
case fetch_field(changeset, :begins_on) do
|
||||
{_, begins_on} ->
|
||||
validate_change(changeset, :ends_on, fn :ends_on, ends_on ->
|
||||
if Date.compare(begins_on, ends_on) == :gt,
|
||||
if DateTime.compare(begins_on, ends_on) == :gt,
|
||||
do: [ends_on: "ends_on cannot be set before begins_on"],
|
||||
else: []
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue