[Rt-commit] rt branch, create-action, updated. b1fc31f71fafb9a398a107f80d4163ff7385d897

sartak at bestpractical.com sartak at bestpractical.com
Wed Nov 18 17:07:06 EST 2009


The branch, create-action has been updated
       via  b1fc31f71fafb9a398a107f80d4163ff7385d897 (commit)
      from  86911931535515740f4c457ad7a0aec81130b7c1 (commit)

Summary of changes:
 lib/RT/Model/Ticket.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit b1fc31f71fafb9a398a107f80d4163ff7385d897
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Nov 18 17:06:41 2009 -0500

    Temporary coercion to cope with a single attachment

diff --git a/lib/RT/Model/Ticket.pm b/lib/RT/Model/Ticket.pm
index 9ee2436..9e5caa2 100755
--- a/lib/RT/Model/Ticket.pm
+++ b/lib/RT/Model/Ticket.pm
@@ -812,6 +812,10 @@ sub create {
     }
 
     if ($args{'attachments'}) {
+        # Once multi-upload works we probably won't have to do this coercion
+        $args{'attachments'} = [$args{'attachments'}]
+            if ref($args{'attachments'}) ne 'ARRAY';
+
         for my $attachment (@{ $args{'attachments'} }) {
             $args{'mime_obj'}->attach(
                 Data     => $attachment->content,

-----------------------------------------------------------------------


More information about the Rt-commit mailing list