diff --git a/CONTRIB.md b/CONTRIB.md index 8085bcb14..95f0270b3 100644 --- a/CONTRIB.md +++ b/CONTRIB.md @@ -62,4 +62,4 @@ If you e.g. add a new column or table, you'll need to migrate the database. You `python migrate_db.py` to do this. -`python upgrade_db.py` and `python downgrade_db.py` can also be used as necessary. Note that I followed [this tutorial](http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database) to set this up. \ No newline at end of file +`python upgrade_db.py` and `python downgrade_db.py` can also be used as necessary. Note that I followed [this tutorial](http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database) to set this up. diff --git a/OpenOversight/app/utils.py b/OpenOversight/app/utils.py index 7a1d40258..8c526f55a 100644 --- a/OpenOversight/app/utils.py +++ b/OpenOversight/app/utils.py @@ -64,7 +64,6 @@ def sort_officers_by_photos(all_officers, officers_w_images): return officers, all_officer_images - def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1] in config.ALLOWED_EXTENSIONS diff --git a/OpenOversight/app/views.py b/OpenOversight/app/views.py index 6cc71424f..042dff669 100644 --- a/OpenOversight/app/views.py +++ b/OpenOversight/app/views.py @@ -34,7 +34,7 @@ def get_gallery(): return render_template('gallery.html', officers=sorted_officers, form=form_values, - officer_images=officer_images) + officer_images=officer_images) @app.route('/complaint', methods=['GET', 'POST']) diff --git a/OpenOversight/test_data.py b/OpenOversight/test_data.py index 5323f912e..06f5784fc 100755 --- a/OpenOversight/test_data.py +++ b/OpenOversight/test_data.py @@ -73,10 +73,10 @@ def cleanup(): assignments = models.Assignment.query.all() for assn in assignments: db.session.delete(assn) - - images = models.Image.query.all() - for image in images: - db.session.delete(image) + + faces = models.Face.query.all() + for face in faces: + db.session.delete(face) # TODO: Reset primary keys on all these tables db.session.commit()