From 0db87a811fef3a08d9f547d53388f1f8ef80422b Mon Sep 17 00:00:00 2001 From: yvesf Date: Thu, 8 Jul 2010 23:37:01 +0200 Subject: fehler im model behoben und test.py aktualisiert --- ebus/web/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ebus/web') diff --git a/ebus/web/model.py b/ebus/web/model.py index 04b15ed..7e21e82 100644 --- a/ebus/web/model.py +++ b/ebus/web/model.py @@ -41,8 +41,8 @@ class Value(ModelBase): def value(self): raise NotImplementedException() -class ValueInt(Value): - __mapper_args__ = {'polymorphic_identity': 'value'} +class ValueFloat(Value): + __mapper_args__ = {'polymorphic_identity': 'float'} value_float = Column(Float(precision=4)) def __init__(self, sensor, value, timestamp=datetime.now()): @@ -53,7 +53,7 @@ class ValueInt(Value): return self.value_float class ValueInt(Value): - __mapper_args__ = {'polymorphic_identity': 'value'} + __mapper_args__ = {'polymorphic_identity': 'int'} value_int = Column(Integer) def __init__(self, sensor, value, timestamp=datetime.now()): @@ -64,12 +64,12 @@ class ValueInt(Value): return self.value_int class ValueString(Value): - __mapper_args__ = {'polymorphic_identity': 'value'} + __mapper_args__ = {'polymorphic_identity': 'string'} value_string = Column(String) def __init__(self, sensor, value, timestamp=datetime.now()): Value.__init__(self, sensor, timestamp) - self.value_int = value + self.value_string = value def value(self): return self.value_string -- cgit v1.2.1