From 20622315bde73fab53537e558ab05ab49c2588ad Mon Sep 17 00:00:00 2001 From: Filoji Date: Thu, 23 Jul 2020 10:01:57 +0200 Subject: [PATCH] Corrections --- app/models/{attachement.py => attachment.py} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename app/models/{attachement.py => attachment.py} (88%) 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):