Skip to content

Commit

Permalink
SBGrid Fix
Browse files Browse the repository at this point in the history
SBGrid fix for color error

After the Python 3 upgrade, this library was complaining about a color being false and bombing out. Our template we were passing didn't change. The section of code bombing out was already had a fallback for color being None, and it was expanded to also handle color being false.
  • Loading branch information
matthew-a-dunlap committed Nov 7, 2019
1 parent 3a1bec7 commit fd353cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xhtml2pdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.2.3"
__version__ = "0.2.3-sbgrid"
2 changes: 1 addition & 1 deletion xhtml2pdf/xhtml2pdf_reportlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def _drawBorderLine(bstyle, width, color, x1, y1, x2, y2):
# We need width and border style to be able to draw a border
if width and getBorderStyle(bstyle):
# If no color for border is given, the text color is used (like defined by W3C)
if color is None:
if color is None or color is False: #SBGrid Fix, unsure why the false makes it this far but this resolves the issue
color = style.textColor
# print "Border", bstyle, width, color
if color is not None:
Expand Down

0 comments on commit fd353cf

Please sign in to comment.