Skip to content

Commit 02e2a0f

Browse files
authored
Merge pull request #514 from Point72/fix/datetime
fix: proper catching of datetime type in py_push_pull adapter
2 parents 294cee9 + ba43420 commit 02e2a0f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cpp/csp/python/PyPushPullInputAdapter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ class TypedPyPushPullInputAdapter : public PyPushPullInputAdapter
6969

7070
void pushPyTick( bool live, PyObject * time, PyObject * value, PushBatch * batch ) override
7171
{
72+
DateTime t = fromPython<DateTime>( time );
7273
try
7374
{
7475
if( !validatePyType( this -> dataType(), m_pyType.ptr(), value ) )
7576
CSP_THROW( TypeError, "" );
76-
pushTick<T>( live, fromPython<DateTime>( time ), std::move( fromPython<T>( value, *this -> dataType() ) ), batch );
77+
pushTick<T>( live, t, std::move( fromPython<T>( value, *this -> dataType() ) ), batch );
7778
}
7879
catch( const TypeError & )
7980
{

0 commit comments

Comments
 (0)