dwyl / dwyl/alog

Is alog being used in my project?

Open
#17 0 comments 0 reactions 1 assignee Claimed by @Cleop View on GitHub
discuss help wanted in-progress question
Dominant language
Elixir
Stars
15
Forks
2
PR merge metrics
No merged PRs in 30d

Description

In my project file `venue.ex` I believed we were using the alog `update` function and I was receiving an error when trying to update a venue with 1 new associated field. It would update the field I was changing but it would reverse a change from an existing associated change.

This is the error message that occurs when you try to perform the update:
![image](https://user-images.githubusercontent.com/16775804/48552901-f7eb4500-e8d1-11e8-960a-1aa2f8782580.png)

It appears that `cs_score` is being listed as both a string key and atom key.

On looking closer it doesn't appear like alog is being used and we are duplicating some of the update fn code:

```
|> Map.put(:id, nil)
|> Map.put(:inserted_at, nil)
|> Map.put(:updated_at, nil)
```

```
|> Resources.put_many_to_many_assoc(attrs, :venue_types, CsGuide.Categories.VenueType, :name)
|> Resources.put_many_to_many_assoc(attrs, :drinks, CsGuide.Resources.Drink, :entry_id)
```

So I checked whether Alog was being used when we created a venue but it turns out that it's not either.

I also tested the update fn to see if the error occurred just on associated fields but it occurs on all fields.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.