dev-labs-bg / sportify

Football match prediction game with simple rules, built on Symfony
GNU Affero General Public License v3.0
33 stars 13 forks source link

AdminPanel / Matches: No result was found for query although at least one row was expected. #22

Closed aminvakil closed 6 years ago

aminvakil commented 6 years ago

I created a tournament and I create two teams and now I want to create their matches, but it gives me this error when I want to add a match.

How can I add these two teams to my tournament?

aminvakil commented 6 years ago

I add them manually from database via their IDs. Does it cause any problem later?

cmihaylov commented 6 years ago

The error provided is not quite useful, could you give us more details from the exception. Also, unfortunately, we've not developed a functionality to add team to tournament from admin panel. Manually creating entries in teams_tournaments table should be OK.

I assume you want to add world cup matches. I would suggest you cleanup your db and follow these steps (after you've logged in as admin): 1) Go to "Admin panel -> Tournaments" and create tournament WorldCup2018 2) Go to "Admin panel -> API Mappings" and add Api Object id = 467 for that tournament. 3) Go to "Admin panel -> Data updates -> Update Teams" and click Update. This will fetch all the World Cup teams from the API. Be patient and wait for it, this can take up to 15-20 seconds. 4) Go to "Admin panel -> Data updates -> Update Match Fixtures", then select "Next 7 days" or "Next 2 weeks" and hit Update. This should fetch the upcoming matches from the API.

For more details on these admin steps read through: https://github.com/dev-labs-bg/sportify#admin-user