Skip to content

Commit

Permalink
Remove null headers during header validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwardrop committed Oct 4, 2018
1 parent 50191b4 commit 9775a43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions knowledge_repo/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ def _verify_headers(self, headers, interactive=False):
"post source file.".format(missing_required_headers)
)

for key, value in headers.items():
if value is None:
del headers[key]

if 'tags' not in headers or not headers['tags']:
headers['tags'] = []
headers['updated_at'] = datetime.datetime.now()
Expand Down

0 comments on commit 9775a43

Please sign in to comment.