Skip to content

Commit

Permalink
rename created by created_date
Browse files Browse the repository at this point in the history
  • Loading branch information
william57m committed Nov 6, 2014
1 parent f1c8c3a commit 032f663
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webserver/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Order(Base):

number = Column(Integer, nullable=False)
date = Column(DateTime, nullable=False)
created = Column(DateTime, default=datetime.now)
created_date = Column(DateTime, default=datetime.now)

client_id = Column(Integer, ForeignKey('client.id'))
client = relationship("Client")
Expand All @@ -26,7 +26,7 @@ def to_dict(self, lines_order=True, state=True):
my_dict['id'] = self.id
my_dict['number'] = self.number
my_dict['date'] = unicode(self.date)
my_dict['created'] = unicode(self.created)
my_dict['created_date'] = unicode(self.created_date)
my_dict['client'] = self.client.to_dict() if self.client else None

if state:
Expand Down

0 comments on commit 032f663

Please sign in to comment.