This commit fixes issue 5367 by updating the edit view to be compatible
with recent db migrations.
Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
This fixes a few bugs in previous migrations and then also introduces a new
migration for those who had run the previous migrations without encountering
the bugs to ensure that the database is in the same state as those who ran it
after the bug fixes introduced in this commit.
The commit also ensures that all activities are valid, they should be but they
might not be so checks, from now on we should be able to assume that all activities
will always be valid.
Some sqlite migrations were failing due to some problems with sqlite. A
work around has been created for these however it does involve loading lots
of data into memory. If you have a large database you should consider trying
to move to postgres.
There was a problem where it was assuming the tablenames are the same
in master as they always were and that isn't the case. This would cause
it to raise an exception when trying to look up a table which didn't exist.
This fixes that by hardcoding the old tablenames in for this migration.
There were a number of tests where lots of models where being iterated through
and then at the end committing them. The problem is all the changes had to be
kept in memory or on disk somewhere before they were commit to the database. This
fix commits each change as it's being made, allowing resources to be freed and fixing
some of the inefficiencies
An exception was raised when a user tried to go to the authroization page
this occured when we changed the field names on the models from "user" to
actor. This patch corrects the query and resolves the error.
This patch fixes issue 5375 by replacing a function call that has
been removed in recent versions of PIL with the recommended
replacement.
(cherry picked from commit 564a48e018bcd786aa32b232cb7216be3ef3fb5e)
This adds a test and improves a previous test for the ability to read
someone elses feed. Previously it was not possible however this has
since been patched and this test checks for that.
Graveyard.serialize raised an exception as the deleted datetime
objects where not being converted to strings for json encoding. It
also didn't deal with the case when there was an actor, it now calls
the actor's serialize method as it should.
Thanks to Alyeph who provided the patches for both of these.
Seek tmp_media_file to 0 before attempting to discover the file type.
This prevents the following error when discovering mp4 video files.
"gst-stream-error-quark: This file is incomplete and cannot be played"
Test was failing due to API change in WebTest around accessing cookies set in the test client. These are now in `test_app.cookies`.
While there are currently 48 other tests failing, I've verified that before and after this change that the same number fail. I've also checked that no other tests use the old API for accessing test client cookies.
I've pinned to version 2.0.18. My understanding is that it's generally a good idea to pin to a specific version where possible to avoid the "why has this suddenly broken" type bugs. This also seems appropriate since WebTest appears to be very stable.
These changes bring `makeadmin` and `changepw` in-line with the approach used in `deleteuser`.
I've also made the error messages more consistent: list the username and full sentences.
This adds a new Comment link table that is used to link between some
object and then the comment object, which can be more or less any
object in Mediagoblin. The MediaComment has been renamed to
TextComment as that more aptly describes what it is. There is
migrations for these changes.
There is also the conslidation of the Report tables into a single
Report table, the same with the Notification objects. This is because
both of them split out MediaEntry and Comment versions into their own
polymorphic versions from a base, this is no longer a meaningful
distinction as comments can be anything.