Commit 90897099 authored by zhitomirskiyi's avatar zhitomirskiyi

not double saving photos

parent d1b91e1e
......@@ -27,12 +27,11 @@ class StatusMessagesController < ApplicationController
current_user.add_to_streams(@status_message, aspects)
current_user.dispatch_post(@status_message, :url => post_url(@status_message))
if !photos.empty? += photos
for photo in photos
was_pending = photo.pending
photo.public = public_flag
photo.pending = false << photo
if was_pending
current_user.add_to_streams(photo, aspects)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment