Add files via upload
This commit is contained in:
@@ -22,6 +22,7 @@ def create_project():
|
||||
name=data['name'],
|
||||
color=data.get('color', '#C9A84C'),
|
||||
description=data.get('description', ''),
|
||||
drive_url=data.get('drive_url', ''),
|
||||
)
|
||||
db.session.add(project)
|
||||
db.session.flush()
|
||||
@@ -40,7 +41,7 @@ def create_project():
|
||||
def update_project(id):
|
||||
project = Project.query.get_or_404(id)
|
||||
data = request.get_json()
|
||||
for field in ('name', 'color', 'description'):
|
||||
for field in ('name', 'color', 'description', 'drive_url'):
|
||||
if field in data:
|
||||
setattr(project, field, data[field])
|
||||
db.session.commit()
|
||||
|
||||
Reference in New Issue
Block a user