The activity type was not preserved when editing an activity (#6)

Co-authored-by: Niklas Deutschmann <sonstharmlos@noreply.codeberg.org>
This commit is contained in:
Niklas 2026-04-13 14:18:38 +02:00 committed by GitHub
parent 03b8e6d315
commit fb440b2b8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,7 +212,7 @@
function populateForm(activity) { function populateForm(activity) {
// Populate form fields // Populate form fields
document.getElementById('title').value = activity.title || ''; document.getElementById('title').value = activity.title || '';
document.getElementById('activityType').value = activity.activityType || 'OTHER'; document.getElementById('activityType').value = activity.activityType?.toUpperCase() || 'OTHER';
document.getElementById('description').value = activity.description || ''; document.getElementById('description').value = activity.description || '';
document.getElementById('visibility').value = activity.visibility || 'PUBLIC'; document.getElementById('visibility').value = activity.visibility || 'PUBLIC';
document.getElementById('race').checked = activity.race || false; document.getElementById('race').checked = activity.race || false;