Skip to content

Commit

Permalink
Merge pull request #17 from tangochin/master
Browse files Browse the repository at this point in the history
Add __bool__ to BoundMetadataField object
  • Loading branch information
varche1 committed Jun 6, 2017
2 parents 90f627f + 3deacd7 commit 0a40537
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions djangoseo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def __str__(self):
class BoundMetadataField(object):
""" An object to help provide templates with access to a "bound" metadata field. """

def __bool__(self):
return bool(self.value)

def __init__(self, field, value):
self.field = field
if value:
Expand Down
2 changes: 1 addition & 1 deletion djangoseo/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding:utf-8 -*-
VERSION = (2, 3, '2wf', 'final', 0)
VERSION = (2, 3, '3wf', 'final', 0)


def get_version():
Expand Down

0 comments on commit 0a40537

Please sign in to comment.