mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-04 13:30:02 -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=''):
|
||||
self.filename = filename
|
||||
self.as_csv_data = csv_data
|
||||
self.as_dict = {
|
||||
|
||||
@property
|
||||
def as_dict(self):
|
||||
return {
|
||||
'file_name': self.filename,
|
||||
'data': self.as_csv_data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user