diff --git a/app/models/attachement.py b/app/models/attachment.py similarity index 88% rename from app/models/attachement.py rename to app/models/attachment.py index cbc5ace..099076f 100644 --- a/app/models/attachement.py +++ b/app/models/attachment.py @@ -2,8 +2,8 @@ from app import db from hashlib import sha256 import os -class Attachement(db.Model): - __tablename__ = 'attachement' +class Attachment(db.Model): + __tablename__ = 'attachment' id = db.Column(db.Integer, primary_key=True) # Original name of the file @@ -22,7 +22,7 @@ class Attachement(db.Model): def __init__(self, file, comment): self.name = file.filename self.size = os.stat(file).st_size - self.hashed = hash_file(file) + self.hashed = self.hash_file(file) self.comment = comment def hash_file(file):