tarbell-project / tarbell

A Flask-based static site authoring tool.
https://tarbell.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
165 stars 32 forks source link

AttributeError hides an easy way to break "values" sheet #454

Open eyeseast opened 6 years ago

eyeseast commented 6 years ago

Here: https://github.com/tarbell-project/tarbell/blob/master/tarbell/app.py#L526

To reproduce, start a project with a values sheet, but delete the key column header. The project will suddenly have no data, just a sad {}. This is because copy_global_values (https://github.com/tarbell-project/tarbell/blob/master/tarbell/app.py#L537) looks for a key column, can't find it and throws an attribute error. So _get_context_from_gdoc returns an empty dictionary.