Fix orientation parameter handling and template URL endpoints
- Add orientation parameter support to create_group and edit_group functions - Fix manage_group.html template URL endpoint from 'update_group_content_order' to 'update_group_content_order_route' - Add orientation field and filtering to edit_group.html template with JavaScript functionality - Update group_player_management.py to handle orientation validation in create and edit operations - Fix docker-compose.yml to include build directive and correct volume paths - Update entrypoint.sh to handle fresh deployments without migrations - Ensure orientation consistency across group and player management These changes resolve: - Internal Server Error on manage_group page - Missing orientation parameter in group creation/editing - Template URL endpoint mismatches - Docker deployment issues with fresh installations
This commit is contained in:
@@ -7,16 +7,7 @@ mkdir -p instance
|
||||
|
||||
# Check if database exists
|
||||
if [ ! -f instance/dashboard.db ]; then
|
||||
echo "No database found, initializing..."
|
||||
|
||||
# Remove and recreate migrations directory to ensure clean state
|
||||
rm -rf migrations
|
||||
mkdir -p migrations
|
||||
|
||||
# Initialize the database
|
||||
flask db init
|
||||
flask db migrate -m "Initial migration"
|
||||
flask db upgrade
|
||||
echo "No database found, creating fresh database..."
|
||||
|
||||
# Create admin user if environment variables are set
|
||||
if [ -n "$ADMIN_USER" ] && [ -n "$ADMIN_PASSWORD" ]; then
|
||||
@@ -26,8 +17,11 @@ if [ ! -f instance/dashboard.db ]; then
|
||||
echo "Warning: ADMIN_USER or ADMIN_PASSWORD not set, skipping admin creation"
|
||||
fi
|
||||
else
|
||||
echo "Existing database found, applying migrations..."
|
||||
flask db upgrade
|
||||
echo "Existing database found, skipping initialization..."
|
||||
echo "Creating admin user if needed..."
|
||||
if [ -n "$ADMIN_USER" ] && [ -n "$ADMIN_PASSWORD" ]; then
|
||||
flask create-admin --username "$ADMIN_USER" --password "$ADMIN_PASSWORD" 2>/dev/null || echo "Default user '$ADMIN_USER' already exists."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Starting DigiServer..."
|
||||
|
||||
Reference in New Issue
Block a user