Unverified Commit 2d23a260 authored by Jonne Haß's avatar Jonne Haß Committed by Benjamin Neff
Browse files

fix old photos without a remote_photo_path or remote_photo_name

closes #8012
parent 39b86ed4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,9 @@
* Enable paranoid mode for devise [#8003](https://github.com/diaspora/diaspora/pull/8003)
* Refactor likes cucumber test [#8002](https://github.com/diaspora/diaspora/pull/8002)

## Bug fixes
* Fix old photos without remote url for export [#8012](https://github.com/diaspora/diaspora/pull/8012)

## Features
* Add a manifest.json file as a first step to make diaspora\* a Progressive Web App [#7998](https://github.com/diaspora/diaspora/pull/7998)
* Allow `web+diaspora://` links to link to a profile with only the diaspora ID [#8000](https://github.com/diaspora/diaspora/pull/8000)
+11 −0
Original line number Diff line number Diff line
# frozen_string_literal: true

class FixMissingRemotePhotoFields < ActiveRecord::Migration[5.1]
  def up
    Photo.where(remote_photo_path: nil).each do |photo|
      photo.write_attribute(:unprocessed_image, photo.read_attribute(:processed_image))
      photo.update_remote_path
      photo.save!
    end
  end
end