Commit 7a8a8184 authored by Clément Schreiner's avatar Clément Schreiner
Browse files

Make result's data a dictionary.

parent 951e7a91
......@@ -33,6 +33,7 @@ Holds plugin_results table model.
from sqlalchemy import orm
import sqlalchemy as sa
from sqlalchemy.orm.collections import attribute_mapped_collection
from debexpo.model import meta, OrmObject
from debexpo.model.package_versions import PackageVersion
......@@ -67,13 +68,16 @@ plugin_result_mapper = orm.mapper(PluginResult,
polymorphic_identity = 'plugin_results',
properties = {
'package_version' : orm.relation(PackageVersion,
backref='plugin_results'),
backref='plugin_results',),
}
)
plugin_result_data_mapper = orm.mapper(PluginResultData,
t_plugin_result_data,
properties = {
'plugin_result' : orm.relation(PluginResult, backref='result_data'),
'plugin_result' : orm.relation(PluginResult,
backref = orm.backref('data',
collection_class=attribute_mapped_collection('key'))
)
}
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment