mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 13:54:30 -04:00
Fix for task archived_at in API
This commit is contained in:
parent
255f8baaa9
commit
1cb9c15925
@ -37,7 +37,13 @@ class EntityTransformer extends TransformerAbstract
|
|||||||
|
|
||||||
protected function getTimestamp($date)
|
protected function getTimestamp($date)
|
||||||
{
|
{
|
||||||
return method_exists($date, 'getTimestamp') ? $date->getTimestamp() : null;
|
if (method_exists($date, 'getTimestamp')) {
|
||||||
|
return $date->getTimestamp();
|
||||||
|
} elseif (is_string($date)) {
|
||||||
|
return strtotime($date);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefaultIncludes()
|
public function getDefaultIncludes()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user