diff --git a/libraries/db/include/graphene/db/index.hpp b/libraries/db/include/graphene/db/index.hpp index 1bc593f42..e8d4fa110 100644 --- a/libraries/db/include/graphene/db/index.hpp +++ b/libraries/db/include/graphene/db/index.hpp @@ -402,6 +402,15 @@ namespace graphene { namespace db { DerivedIndex::remove(obj); } + virtual const object& insert( object&& obj )override + { + const auto& res = DerivedIndex::insert(std::move(obj)); + for( const auto& item : _sindex ) + item->object_inserted( res ); + on_add(res); + return res; + } + virtual void modify( const object& obj, const std::function& m )override { save_undo( obj ); diff --git a/tests/common/database_fixture.cpp b/tests/common/database_fixture.cpp index f31ec00af..f61a462b7 100644 --- a/tests/common/database_fixture.cpp +++ b/tests/common/database_fixture.cpp @@ -141,6 +141,8 @@ database_fixture::database_fixture() mhplugin->plugin_startup(); bookieplugin->plugin_startup(); affiliateplugin->plugin_startup(); + // stats api requests affiliate_stats plugin from app, so add it to app plugin list + app.enable_plugin(affiliateplugin->plugin_name()); generate_block();