[Rt-commit] [rtir] 01/02: Default field value to '' if undef from null DB value
Jim Brandt
jbrandt at bestpractical.com
Thu Jun 20 09:06:45 EDT 2013
This is an automated email from the git hooks/post-receive script.
jbrandt pushed a commit to branch 2.9/1.1.1-upgrade-script-updates
in repository rtir.
commit 2b1d926753c3f5c83cf0e6446ec83b060affcd5b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Thu Jun 20 08:19:49 2013 -0400
Default field value to '' if undef from null DB value
---
etc/upgrade/1.1.1/content | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/etc/upgrade/1.1.1/content b/etc/upgrade/1.1.1/content
index b9bad2e..83fba89 100644
--- a/etc/upgrade/1.1.1/content
+++ b/etc/upgrade/1.1.1/content
@@ -361,6 +361,10 @@ sub set_scrip_field {
my ($field, $value) = @_;
my $cur = $scrip->$field();
+
+ # Can be undef if value is null in the DB
+ $cur = '' if not defined $cur;
+
return if $value =~ /^\d+$/? $cur == $value: $cur eq $value;
my $method = 'Set'. $field;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Rt-commit
mailing list