add: functions to insert list (for junctions)
This commit is contained in:
parent
9fb525530f
commit
d23655eb61
7 changed files with 155 additions and 26 deletions
src/models
|
@ -167,10 +167,12 @@ relay_save(relay_t *relay)
|
|||
junction_relay_schedule_remove_for_relay(relay->id);
|
||||
|
||||
LOGGER_DEBUG("rebuilding relay_schedule junction\n");
|
||||
int schedule_ids[7];
|
||||
for(int i = 0; i < 7; ++i)
|
||||
{
|
||||
junction_relay_schedule_insert(i, relay->id, relay->schedules[i]->id);
|
||||
schedule_ids[i] = relay->schedules[i]->id;
|
||||
}
|
||||
junction_relay_schedule_insert_weekdays(relay->id, schedule_ids);
|
||||
|
||||
if(opened_transaction)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue