mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 17:24:23 -04:00
Move as_dict property to its own method
This helps declutter the init method, and is one less thing to create in memory when it’s not needed.
This commit is contained in:
@@ -226,7 +226,10 @@ class Spreadsheet():
|
|||||||
def __init__(self, csv_data, filename=''):
|
def __init__(self, csv_data, filename=''):
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.as_csv_data = csv_data
|
self.as_csv_data = csv_data
|
||||||
self.as_dict = {
|
|
||||||
|
@property
|
||||||
|
def as_dict(self):
|
||||||
|
return {
|
||||||
'file_name': self.filename,
|
'file_name': self.filename,
|
||||||
'data': self.as_csv_data
|
'data': self.as_csv_data
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user