codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 69 forks source link

fix initial revision for policy posts & improve seed error reporting #1201

Closed Oaphi closed 11 months ago

Oaphi commented 1 year ago

This PR (followup for #1175) addresses the root cause of seeded posts not having an initial revision: owner user is required for the create_initial_revision validation callback to run successfully. I opted to assign the seeded posts to the system (-1) user as it seems the most fitting (let me know if y'all want me to guard against not finding the system user - I've cut the corner here as not having the system user at this point means something's very wrong already).

The PR also includes some error reporting improvements: