Skip to content

Commit

Permalink
fix audio recording breaking with country check
Browse files Browse the repository at this point in the history
  • Loading branch information
hinanaya committed May 20, 2024
1 parent 28a62ea commit a964fdc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions models/media_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1166,10 +1166,12 @@ public function validate($args = [])
return array(false,$item['local_id'],'The category selected is no longer valid.');
}
//T The country selected is no longer valid.
$this->db->where('country_id', $item['country']);
$exists = $this->db->get_one('countries');
if (!empty($item['country']) && !$exists) {
return array(false,$item['local_id'],'The country selected is no longer valid.');
if (!empty($item['country'])) {
$this->db->where('country_id', $item['country']);
$exists = $this->db->get_one('countries');
if (!$exists) {
return array(false,$item['local_id'],'The country selected is no longer valid.');
}
}
//T The genre selected is no longer valid.
if (!empty($item['genre_id']) && !$this->db->id_exists('media_genres', $item['genre_id'])) {
Expand Down

0 comments on commit a964fdc

Please sign in to comment.