summaryrefslogtreecommitdiff
path: root/ebus
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2010-07-08 23:37:01 +0200
committeryvesf <yvesf-git@xapek.org>2010-07-08 23:37:01 +0200
commit0db87a811fef3a08d9f547d53388f1f8ef80422b (patch)
tree300e8d6327679e9224723914976450b0fedb5fea /ebus
parent7a57ef77a3093f480ab414400d44d546f283d81c (diff)
downloadebus-alt-0db87a811fef3a08d9f547d53388f1f8ef80422b.tar.gz
ebus-alt-0db87a811fef3a08d9f547d53388f1f8ef80422b.zip
fehler im model behoben und test.py aktualisiert
Diffstat (limited to 'ebus')
-rw-r--r--ebus/web/model.py10
1 files changed, 5 insertions, 5 deletions
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