From eee4ce724bbef1b6e2c98fd3c5fa6b9157225bfd Mon Sep 17 00:00:00 2001 From: Phawin Khongkhasawan Date: Thu, 12 Sep 2019 15:15:11 +0700 Subject: [PATCH 1/3] Convert to string if value is instance of int --- sendgrid/helpers/mail/substitution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sendgrid/helpers/mail/substitution.py b/sendgrid/helpers/mail/substitution.py index a441ebe64..64bdb118c 100644 --- a/sendgrid/helpers/mail/substitution.py +++ b/sendgrid/helpers/mail/substitution.py @@ -24,7 +24,7 @@ def key(self, value): @property def value(self): - return self._value + return str(self._value) if isinstance(self._value, int) else self.__value @value.setter def value(self, value): From c643a1750f818c14c3088724b4e0b85a6bcac1df Mon Sep 17 00:00:00 2001 From: Phawin Khongkhasawan Date: Thu, 12 Sep 2019 15:15:38 +0700 Subject: [PATCH 2/3] Fix test license year --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 69511d70c..044ba66a3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2012-2018 SendGrid, Inc. +Copyright (c) 2012-2019 SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation From 0fe96a9064ea34742ebfd35b9d688397533f1284 Mon Sep 17 00:00:00 2001 From: Phawin Khongkhasawan Date: Thu, 12 Sep 2019 15:21:37 +0700 Subject: [PATCH 3/3] Fix fail test --- sendgrid/helpers/mail/substitution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sendgrid/helpers/mail/substitution.py b/sendgrid/helpers/mail/substitution.py index 59cc5b704..d515e885b 100644 --- a/sendgrid/helpers/mail/substitution.py +++ b/sendgrid/helpers/mail/substitution.py @@ -48,7 +48,7 @@ def value(self): :rtype value: string """ - return str(self._value) if isinstance(self._value, int) else self.__value + return str(self._value) if isinstance(self._value, int) else self._value @value.setter def value(self, value):