Add last updated field to accounts table
The query here isn't quite right, but I don't have a network connection so I can't be bothered to do the actual research to find out how to do the SQL correctly. Also, I don't really care until I can do more updates, so that's fine too
This commit is contained in:
parent
8a2f7bae70
commit
cd11c51cac
|
@ -9,7 +9,7 @@
|
|||
<td>{{ account.name }}</td>
|
||||
<td>{{ account.type }}</td>
|
||||
<td>{{ account.source.name }}</td>
|
||||
<td>Never</td>
|
||||
<td>{{ account.last_updated }}</td>
|
||||
<td>
|
||||
<form method="POST" action="/update/">
|
||||
<input type="hidden" name="account_uuid" value="{{ account.uuid }}"></input>
|
||||
|
|
|
@ -18,8 +18,11 @@ def _select():
|
|||
vanth.tables.OFXAccount.c.uuid,
|
||||
vanth.tables.OFXSource.c.name.label('source.name'),
|
||||
vanth.tables.OFXSource.c.uuid.label('source.uuid'),
|
||||
vanth.tables.OFXUpdate.c.created,
|
||||
]).where(
|
||||
vanth.tables.OFXAccount.c.source == vanth.tables.OFXSource.c.uuid
|
||||
).where(
|
||||
vanth.tables.OFXAccount.c.uuid == vanth.tables.OFXUpdate.c.ofxaccount
|
||||
)
|
||||
|
||||
def _execute_and_convert(query):
|
||||
|
@ -28,6 +31,7 @@ def _execute_and_convert(query):
|
|||
return [{
|
||||
'account_id' : result[vanth.tables.OFXAccount.c.account_id],
|
||||
'name' : result[vanth.tables.OFXAccount.c.name],
|
||||
'last_updated' : result[vanth.tables.OFXUpdate.c.created],
|
||||
'password' : result[vanth.tables.OFXAccount.c.password],
|
||||
'source' : {
|
||||
'name' : result[vanth.tables.OFXSource.c.name.label('source.name')],
|
||||
|
|
Loading…
Reference in New Issue