mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Default to raw value, use Row.display(key) for display, refs #521
This commit is contained in:
parent
2b847240bb
commit
43a5567be8
1 changed files with 3 additions and 3 deletions
|
|
@ -43,13 +43,13 @@ class Row:
|
|||
def __getitem__(self, key):
|
||||
for cell in self.cells:
|
||||
if cell["column"] == key:
|
||||
return cell["value"]
|
||||
return cell["raw"]
|
||||
raise KeyError
|
||||
|
||||
def raw(self, key):
|
||||
def display(self, key):
|
||||
for cell in self.cells:
|
||||
if cell["column"] == key:
|
||||
return cell["raw"]
|
||||
return cell["value"]
|
||||
return None
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue